[PATCH] sparseirq: fix hang with !SPARSE_IRQ

From: Yinghai Lu
Date: Sat Dec 27 2008 - 01:39:03 EST


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@xxxxxxxxx>
Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

---
init/main.c | 6 ------
kernel/irq/handle.c | 15 +++++++++++++++
2 files changed, 15 insertions(+), 6 deletions(-)

Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -218,6 +218,21 @@ struct irq_desc irq_desc[NR_IRQS] __cach
}
};

+void __init early_irq_init(void)
+{
+ struct irq_desc *desc;
+ int count;
+ int i;
+
+ desc = irq_desc;
+ count = ARRAY_SIZE(irq_desc);
+
+ for (i = 0; i < count; i++)
+ desc[i].irq = i;
+
+ arch_early_irq_init();
+}
+
struct irq_desc *irq_to_desc(unsigned int irq)
{
return (irq < NR_IRQS) ? irq_desc + irq : NULL;
Index: linux-2.6/init/main.c
===================================================================
--- linux-2.6.orig/init/main.c
+++ linux-2.6/init/main.c
@@ -549,15 +549,9 @@ void __init __weak thread_info_cache_ini
barrier();
}

-void __init __weak arch_early_irq_init(void)
-{
- barrier();
-}
-
void __init __weak early_irq_init(void)
{
barrier();
- arch_early_irq_init();
}

asmlinkage void __init start_kernel(void)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/