Merge branch 'irq/numa' into x86/mce3
authorH. Peter Anvin <hpa@zytor.com>
Mon, 1 Jun 2009 22:13:02 +0000 (15:13 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 1 Jun 2009 22:25:31 +0000 (15:25 -0700)
Merge reason: arch/x86/kernel/irqinit_{32,64}.c unified in irq/numa
and modified in x86/mce3; this merge resolves the conflict.

Conflicts:
arch/x86/kernel/irqinit.c

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1  2 
arch/x86/Kconfig
arch/x86/include/asm/irq_vectors.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/irq.c
arch/x86/kernel/irqinit.c
arch/x86/kernel/traps.c

Simple merge
Simple merge
Simple merge
@@@ -176,9 -174,9 +174,9 @@@ u64 arch_irq_stat_cpu(unsigned int cpu
  #endif
  #ifdef CONFIG_X86_MCE
        sum += irq_stats(cpu)->irq_thermal_count;
 -# ifdef CONFIG_X86_64
 +# ifdef CONFIG_X86_MCE_THRESHOLD
        sum += irq_stats(cpu)->irq_threshold_count;
- #endif
+ # endif
  #endif
        return sum;
  }
@@@ -168,8 -174,19 +174,21 @@@ static void __init smp_intr_init(void
        set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
        set_bit(IRQ_MOVE_CLEANUP_VECTOR, used_vectors);
  #endif
+ #endif /* CONFIG_SMP */
+ }
+ static void __init apic_intr_init(void)
+ {
+       smp_intr_init();
  
- #ifdef CONFIG_X86_LOCAL_APIC
 -#ifdef CONFIG_X86_64
++#ifdef CONFIG_X86_THERMAL_VECTOR
+       alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
++#endif
++#ifdef CONFIG_X86_THRESHOLD
+       alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
+ #endif
+ #if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
        /* self generated IPI for local APIC timer */
        alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
  
        /* IPI vectors for APIC spurious and error interrupts */
        alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
        alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
- #endif
  
- #ifdef CONFIG_X86_THERMAL_VECTOR
-       /* thermal monitor LVT interrupt */
-       alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
+       /* Performance monitoring interrupts: */
+ # ifdef CONFIG_PERF_COUNTERS
+       alloc_intr_gate(LOCAL_PERF_VECTOR, perf_counter_interrupt);
+       alloc_intr_gate(LOCAL_PENDING_VECTOR, perf_pending_interrupt);
+ # endif
  #endif
 -
 -#ifdef CONFIG_X86_32
 -#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_MCE_P4THERMAL)
 -      /* thermal monitor LVT interrupt */
 -      alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
 -#endif
 -#endif
+ }
  
- #ifdef CONFIG_X86_MCE_THRESHOLD
-       alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
+ /**
+  * x86_quirk_pre_intr_init - initialisation prior to setting up interrupt vectors
+  *
+  * Description:
+  *    Perform any necessary interrupt initialisation prior to setting up
+  *    the "ordinary" interrupt call gates.  For legacy reasons, the ISA
+  *    interrupts should be initialised here if the machine emulates a PC
+  *    in any way.
+  **/
+ static void __init x86_quirk_pre_intr_init(void)
+ {
+ #ifdef CONFIG_X86_32
+       if (x86_quirks->arch_pre_intr_init) {
+               if (x86_quirks->arch_pre_intr_init())
+                       return;
+       }
  #endif
+       init_ISA_irqs();
+ }
+ void __init native_init_IRQ(void)
+ {
+       int i;
+       /* Execute any quirks before the call gates are initialised: */
+       x86_quirk_pre_intr_init();
+       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 = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
+               /* IA32_SYSCALL_VECTOR could be used in trap_init already. */
+               if (!test_bit(i, used_vectors))
+                       set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
+       }
  
        if (!acpi_ioapic)
                setup_irq(2, &irq2);
Simple merge