[PATCH] powerpc: Fix PowerMac IRQ handling bug

The port to genirq & the new powerpc interrupt model in 2.6.18 introduced a
bug in the legacy PowerMac PIC code (used on older machines) because of a
typo potentially causing hangs due to interrupt storms. This fixes it,
along with a performance issue causing us to do spurrious retriggers after
masking an interrupt.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Benjamin Herrenschmidt and committed by Linus Torvalds ca72945d d565dd3b

+3 -3
+3 -3
arch/powerpc/platforms/powermac/pic.c
··· 87 87 static void pmac_mask_and_ack_irq(unsigned int virq) 88 88 { 89 89 unsigned int src = irq_map[virq].hwirq; 90 - unsigned long bit = 1UL << (virq & 0x1f); 91 - int i = virq >> 5; 90 + unsigned long bit = 1UL << (src & 0x1f); 91 + int i = src >> 5; 92 92 unsigned long flags; 93 93 94 94 spin_lock_irqsave(&pmac_pic_lock, flags); ··· 175 175 176 176 spin_lock_irqsave(&pmac_pic_lock, flags); 177 177 __clear_bit(src, ppc_cached_irq_mask); 178 - __pmac_set_irq_mask(src, 0); 178 + __pmac_set_irq_mask(src, 1); 179 179 spin_unlock_irqrestore(&pmac_pic_lock, flags); 180 180 } 181 181