From: H. Peter Anvin Date: Mon, 1 Jun 2009 22:13:02 +0000 (-0700) Subject: Merge branch 'irq/numa' into x86/mce3 X-Git-Tag: v2.6.31-rc1~349^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48b1fddbb100a64f3983ca9768b8ea629a09aa20;p=platform%2Fkernel%2Flinux-3.10.git Merge branch 'irq/numa' into x86/mce3 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 --- 48b1fddbb100a64f3983ca9768b8ea629a09aa20 diff --cc arch/x86/kernel/irq.c index 35eddc9,c1739ac..a05660b --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@@ -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; } diff --cc arch/x86/kernel/irqinit.c index 2512ad9,2e08b10..aab3d27 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c @@@ -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); @@@ -179,16 -196,62 +198,55 @@@ /* 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);