aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/irqinit_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:29 -0400
commit08678b0841267c1d00d771fe01548d86043d065e (patch)
tree7debb21f9e9a768ced43077f7376797a0c46f8c0 /arch/x86/kernel/irqinit_64.c
parentbfea1238beac9d306eeac081c67de5ca6aec4c7a (diff)
generic: sparse irqs: use irq_desc() together with dyn_array, instead of irq_desc[]
add CONFIG_HAVE_SPARSE_IRQ to for use condensed array. Get rid of irq_desc[] array assumptions. Preallocate 32 irq_desc, and irq_desc() will try to get more. ( No change in functionality is expected anywhere, except the odd build failure where we missed a code site or where a crossing commit itroduces new irq_desc[] usage. ) v2: according to Eric, change get_irq_desc() to irq_desc() Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irqinit_64.c')
-rw-r--r--arch/x86/kernel/irqinit_64.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
index 165c5d9b0d1a..0744b49b4d12 100644
--- a/arch/x86/kernel/irqinit_64.c
+++ b/arch/x86/kernel/irqinit_64.c
@@ -143,9 +143,11 @@ void __init init_ISA_irqs(void)
143 init_8259A(0); 143 init_8259A(0);
144 144
145 for (i = 0; i < nr_irqs; i++) { 145 for (i = 0; i < nr_irqs; i++) {
146 irq_desc[i].status = IRQ_DISABLED; 146 struct irq_desc *desc = irq_to_desc(i);
147 irq_desc[i].action = NULL; 147
148 irq_desc[i].depth = 1; 148 desc->status = IRQ_DISABLED;
149 desc->action = NULL;
150 desc->depth = 1;
149 151
150 if (i < 16) { 152 if (i < 16) {
151 /* 153 /*
@@ -157,7 +159,7 @@ void __init init_ISA_irqs(void)
157 /* 159 /*
158 * 'high' PCI IRQs filled in on demand 160 * 'high' PCI IRQs filled in on demand
159 */ 161 */
160 irq_desc[i].chip = &no_irq_chip; 162 desc->chip = &no_irq_chip;
161 } 163 }
162 } 164 }
163} 165}