diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-02-22 16:25:18 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-22 16:25:18 -0800 |
commit | 54b56170e4517e9606b245c3f805fc96baa059f0 (patch) | |
tree | 9f8750ef972b4a7fdce530889dcbaf2a8b5b0d05 /arch/x86/kernel/irqinit.c | |
parent | 1f91233c26fd5f7d6525fd29b95e4b50ca7a3e88 (diff) | |
parent | d02e30c31c57683a66ed68a1bcff900ca78f6d56 (diff) |
Merge remote branch 'origin/x86/apic' into x86/mrst
Conflicts:
arch/x86/kernel/apic/io_apic.c
Diffstat (limited to 'arch/x86/kernel/irqinit.c')
-rw-r--r-- | arch/x86/kernel/irqinit.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index 89b9510e803..d2f787b3de5 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c @@ -84,24 +84,7 @@ static struct irqaction irq2 = { }; DEFINE_PER_CPU(vector_irq_t, vector_irq) = { - [0 ... IRQ0_VECTOR - 1] = -1, - [IRQ0_VECTOR] = 0, - [IRQ1_VECTOR] = 1, - [IRQ2_VECTOR] = 2, - [IRQ3_VECTOR] = 3, - [IRQ4_VECTOR] = 4, - [IRQ5_VECTOR] = 5, - [IRQ6_VECTOR] = 6, - [IRQ7_VECTOR] = 7, - [IRQ8_VECTOR] = 8, - [IRQ9_VECTOR] = 9, - [IRQ10_VECTOR] = 10, - [IRQ11_VECTOR] = 11, - [IRQ12_VECTOR] = 12, - [IRQ13_VECTOR] = 13, - [IRQ14_VECTOR] = 14, - [IRQ15_VECTOR] = 15, - [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1 + [0 ... NR_VECTORS - 1] = -1, }; int vector_used_by_percpu_irq(unsigned int vector) @@ -116,6 +99,9 @@ int vector_used_by_percpu_irq(unsigned int vector) return 0; } +/* Number of legacy interrupts */ +int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY; + void __init init_ISA_irqs(void) { int i; @@ -142,6 +128,19 @@ void __init init_ISA_irqs(void) void __init init_IRQ(void) { + int i; + + /* + * On cpu 0, Assign IRQ0_VECTOR..IRQ15_VECTOR's to IRQ 0..15. + * If these IRQ's are handled by legacy interrupt-controllers like PIC, + * then this configuration will likely be static after the boot. If + * these IRQ's are handled by more mordern controllers like IO-APIC, + * then this vector space can be freed and re-used dynamically as the + * irq's migrate etc. + */ + for (i = 0; i < nr_legacy_irqs; i++) + per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i; + x86_init.irqs.intr_init(); } |