Skip to contentSkip to conversation

sparseirq: fix hang with !SPARSE_IRQ

PATCH In review Yinghai Lu 2 participants 2 messages Dec 27, 2008 1 message not in the archive IRQ

lore
Share & tools
lore

Yinghai Lu

author
#1 lore raw

PATCH 1/1 sparseirq: fix hang with !SPARSE_IRQ

In reply to a message not in the archive

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" <[email protected]>

---
 init/main.c         |    6 ------
 kernel/irq/handle.c |   15 +++++++++++++++
 2 files changed, 15 insertions(+), 6 deletions(-)
kernel/irq/handle.c +15 -0
Index: 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;
init/main.c +0 -6
Index: 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)
#2 lore raw
Quoted 7 lines · Yinghai Lu

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

Quoted 7 lines

Reported by: "Siddha, Suresh B" <[email protected]>

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

applied to tip/irq/sparseirq - thanks Yinghai. This fixed a testsystem of mine as well that showed weird hangs with !sparseirq.

Ingo