aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/handle.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2008-12-27 01:38:15 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-27 11:52:07 -0500
commit12026ea16a618b289fcf457661aed24f57323a20 (patch)
tree69375cb891e5d9593fc7bc9fdd87be952e4325e7 /kernel/irq/handle.c
parentfa6beb37b0d9bc00f90f11154eeed9502d8b0a37 (diff)
sparseirq: fix hang with !SPARSE_IRQ
Impact: fix hang Suresh report his two sockets system only works with SPARSE_IRQ enable it turns out we miss the setting desc->irq so provide early_irq_init() even !SPARSE_IRQ to set desc->irq Reported-by: "Siddha, Suresh B" <suresh.b.siddha@intel.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/handle.c')
-rw-r--r--kernel/irq/handle.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index e1cf4e391cae..157c04c3b158 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -218,6 +218,21 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
218 } 218 }
219}; 219};
220 220
221int __init early_irq_init(void)
222{
223 struct irq_desc *desc;
224 int count;
225 int i;
226
227 desc = irq_desc;
228 count = ARRAY_SIZE(irq_desc);
229
230 for (i = 0; i < count; i++)
231 desc[i].irq = i;
232
233 return arch_early_irq_init();
234}
235
221struct irq_desc *irq_to_desc(unsigned int irq) 236struct irq_desc *irq_to_desc(unsigned int irq)
222{ 237{
223 return (irq < NR_IRQS) ? irq_desc + irq : NULL; 238 return (irq < NR_IRQS) ? irq_desc + irq : NULL;