|
@@ -120,28 +120,8 @@ int vector_used_by_percpu_irq(unsigned int vector)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-/* Overridden in paravirt.c */
|
|
|
-void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
|
|
|
-
|
|
|
-void __init native_init_IRQ(void)
|
|
|
+static void __init smp_intr_init(void)
|
|
|
{
|
|
|
- int i;
|
|
|
-
|
|
|
- /* all the set up before the call gates are initialised */
|
|
|
- pre_intr_init_hook();
|
|
|
-
|
|
|
- /*
|
|
|
- * Cover the whole vector space, no vector can escape
|
|
|
- * us. (some of these will be overridden and become
|
|
|
- * 'special' SMP interrupts)
|
|
|
- */
|
|
|
- for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
|
|
|
- /* SYSCALL_VECTOR was reserved in trap_init. */
|
|
|
- if (i != SYSCALL_VECTOR)
|
|
|
- set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_SMP)
|
|
|
/*
|
|
|
* The reschedule interrupt is a CPU-to-CPU reschedule-helper
|
|
@@ -170,8 +150,13 @@ void __init native_init_IRQ(void)
|
|
|
set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
|
|
|
set_bit(IRQ_MOVE_CLEANUP_VECTOR, used_vectors);
|
|
|
#endif
|
|
|
+}
|
|
|
|
|
|
+static void __init apic_intr_init(void)
|
|
|
+{
|
|
|
#ifdef CONFIG_X86_LOCAL_APIC
|
|
|
+ smp_intr_init();
|
|
|
+
|
|
|
/* self generated IPI for local APIC timer */
|
|
|
alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
|
|
|
|
|
@@ -181,12 +166,37 @@ void __init native_init_IRQ(void)
|
|
|
# ifdef CONFIG_PERF_COUNTERS
|
|
|
alloc_intr_gate(LOCAL_PERF_VECTOR, perf_counter_interrupt);
|
|
|
# endif
|
|
|
-#endif
|
|
|
|
|
|
-#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_MCE_P4THERMAL)
|
|
|
+# ifdef CONFIG_X86_MCE_P4THERMAL
|
|
|
/* thermal monitor LVT interrupt */
|
|
|
alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
|
|
|
+# endif
|
|
|
#endif
|
|
|
+}
|
|
|
+
|
|
|
+/* Overridden in paravirt.c */
|
|
|
+void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
|
|
|
+
|
|
|
+void __init native_init_IRQ(void)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+
|
|
|
+ /* all the set up before the call gates are initialised */
|
|
|
+ pre_intr_init_hook();
|
|
|
+
|
|
|
+ apic_intr_init();
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Cover the whole vector space, no vector can escape
|
|
|
+ * us. (some of these will be overridden and become
|
|
|
+ * 'special' SMP interrupts)
|
|
|
+ */
|
|
|
+ for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
|
|
|
+ int vector = FIRST_EXTERNAL_VECTOR + i;
|
|
|
+ /* SYSCALL_VECTOR was reserved in trap_init. */
|
|
|
+ if (!test_bit(vector, used_vectors))
|
|
|
+ set_intr_gate(vector, interrupt[i]);
|
|
|
+ }
|
|
|
|
|
|
if (!acpi_ioapic)
|
|
|
setup_irq(2, &irq2);
|