Skip to contentSkip to conversation

Fix irq radix tree remapping typo

PATCH In review Benjamin Herrenschmidt 2 participants 2 messages Aug 17, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix irq radix tree remapping typo

The code for using the radix tree for reverse mapping of interrupts has a typo that causes it to create incorrect mappings if the software and hardware numbers happen to be different. This would, among others, cause the IDE interrupt to fail on js20's. This fixes it.

---

Please apply to 2.6.18

arch/powerpc/kernel/irq.c +1 -1
Index: linux-work/arch/powerpc/kernel/irq.c
===================================================================
@@ -693,7 +693,7 @@ unsigned int irq_radix_revmap(struct irq
 	/* If not there, try to insert it */
 	virq = irq_find_mapping(host, hwirq);
 	if (virq != NO_IRQ)
-		radix_tree_insert(tree, virq, &irq_map[virq]);
+		radix_tree_insert(tree, hwirq, &irq_map[virq]);
  bail:
 	spin_unlock_irqrestore(&irq_big_lock, flags);
 	return virq;
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Benjamin Herrenschmidt

The code for using the radix tree for reverse mapping of interrupts has a typo that causes it to create incorrect mappings if the software and hardware numbers happen to be different. This would, among others, cause the IDE interrupt to fail on js20's. This fixes it.

---

Please apply to 2.6.18

Index: linux-work/arch/powerpc/kernel/irq.c
===================================================================

arch/powerpc/kernel/irq.c unsigned int irq_radix_revmap(struct irq · line 699

Quoted 8 lines
arch/powerpc/kernel/irq.c +1 -1
@@ -693,7 +693,7 @@ unsigned int irq_radix_revmap(struct irq
 	/* If not there, try to insert it */
 	virq = irq_find_mapping(host, hwirq);
 	if (virq != NO_IRQ)
-		radix_tree_insert(tree, virq, &irq_map[virq]);
+		radix_tree_insert(tree, hwirq, &irq_map[virq]);
  bail:
 	spin_unlock_irqrestore(&irq_big_lock, flags);
 	return virq;

This patch has fixed booting on the machine I originally reported the issue with. Thanks much.

Signature · 2 lines
Steve Fox
IBM Linux Technology Center