diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-02-22 19:25:18 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-22 19:25:18 -0500 |
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 89b9510e8030..d2f787b3de56 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
@@ -84,24 +84,7 @@ static struct irqaction irq2 = { | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { | 86 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { |
87 | [0 ... IRQ0_VECTOR - 1] = -1, | 87 | [0 ... NR_VECTORS - 1] = -1, |
88 | [IRQ0_VECTOR] = 0, | ||
89 | [IRQ1_VECTOR] = 1, | ||
90 | [IRQ2_VECTOR] = 2, | ||
91 | [IRQ3_VECTOR] = 3, | ||
92 | [IRQ4_VECTOR] = 4, | ||
93 | [IRQ5_VECTOR] = 5, | ||
94 | [IRQ6_VECTOR] = 6, | ||
95 | [IRQ7_VECTOR] = 7, | ||
96 | [IRQ8_VECTOR] = 8, | ||
97 | [IRQ9_VECTOR] = 9, | ||
98 | [IRQ10_VECTOR] = 10, | ||
99 | [IRQ11_VECTOR] = 11, | ||
100 | [IRQ12_VECTOR] = 12, | ||
101 | [IRQ13_VECTOR] = 13, | ||
102 | [IRQ14_VECTOR] = 14, | ||
103 | [IRQ15_VECTOR] = 15, | ||
104 | [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1 | ||
105 | }; | 88 | }; |
106 | 89 | ||
107 | int vector_used_by_percpu_irq(unsigned int vector) | 90 | int vector_used_by_percpu_irq(unsigned int vector) |
@@ -116,6 +99,9 @@ int vector_used_by_percpu_irq(unsigned int vector) | |||
116 | return 0; | 99 | return 0; |
117 | } | 100 | } |
118 | 101 | ||
102 | /* Number of legacy interrupts */ | ||
103 | int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY; | ||
104 | |||
119 | void __init init_ISA_irqs(void) | 105 | void __init init_ISA_irqs(void) |
120 | { | 106 | { |
121 | int i; | 107 | int i; |
@@ -142,6 +128,19 @@ void __init init_ISA_irqs(void) | |||
142 | 128 | ||
143 | void __init init_IRQ(void) | 129 | void __init init_IRQ(void) |
144 | { | 130 | { |
131 | int i; | ||
132 | |||
133 | /* | ||
134 | * On cpu 0, Assign IRQ0_VECTOR..IRQ15_VECTOR's to IRQ 0..15. | ||
135 | * If these IRQ's are handled by legacy interrupt-controllers like PIC, | ||
136 | * then this configuration will likely be static after the boot. If | ||
137 | * these IRQ's are handled by more mordern controllers like IO-APIC, | ||
138 | * then this vector space can be freed and re-used dynamically as the | ||
139 | * irq's migrate etc. | ||
140 | */ | ||
141 | for (i = 0; i < nr_legacy_irqs; i++) | ||
142 | per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i; | ||
143 | |||
145 | x86_init.irqs.intr_init(); | 144 | x86_init.irqs.intr_init(); |
146 | } | 145 | } |
147 | 146 | ||