x86: move smp_intr_init away from smpboot_32.c
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Wed, 19 Mar 2008 17:25:33 +0000 (14:25 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:01 +0000 (17:41 +0200)
We move it to apic_32.c, since it's irq related anyway,
and only called from that file.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic_32.c
arch/x86/kernel/smpboot_32.c

index 6aa93db7faa3751a5c9ac9e4cf48cc29689d35ce..c32cc0feb47b8e333aa2e2868fbb9afac853f4d6 100644 (file)
@@ -1317,6 +1317,29 @@ void smp_error_interrupt(struct pt_regs *regs)
        irq_exit();
 }
 
+#ifdef CONFIG_SMP
+void __init smp_intr_init(void)
+{
+       /*
+        * IRQ0 must be given a fixed assignment and initialized,
+        * because it's used before the IO-APIC is set up.
+        */
+       set_intr_gate(FIRST_DEVICE_VECTOR, interrupt[0]);
+
+       /*
+        * The reschedule interrupt is a CPU-to-CPU reschedule-helper
+        * IPI, driven by wakeup.
+        */
+       set_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
+
+       /* IPI for invalidation */
+       set_intr_gate(INVALIDATE_TLB_VECTOR, invalidate_interrupt);
+
+       /* IPI for generic function call */
+       set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
+}
+#endif
+
 /*
  * Initialize APIC interrupts
  */
index 1736404c3c36af2e0f3d561c7e0a76bfdc80372b..87c9a75d929c640386dff9f606a07efb75971bfc 100644 (file)
@@ -968,24 +968,3 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
 #endif
        zap_low_mappings();
 }
-
-void __init smp_intr_init(void)
-{
-       /*
-        * IRQ0 must be given a fixed assignment and initialized,
-        * because it's used before the IO-APIC is set up.
-        */
-       set_intr_gate(FIRST_DEVICE_VECTOR, interrupt[0]);
-
-       /*
-        * The reschedule interrupt is a CPU-to-CPU reschedule-helper
-        * IPI, driven by wakeup.
-        */
-       set_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
-
-       /* IPI for invalidation */
-       set_intr_gate(INVALIDATE_TLB_VECTOR, invalidate_interrupt);
-
-       /* IPI for generic function call */
-       set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
-}