From: Benjamin Herrenschmidt Date: Fri, 1 Sep 2006 04:27:50 +0000 (-0700) Subject: [PATCH] powerpc: Fix PowerMac IRQ handling bug X-Git-Tag: v2.6.18-rc6~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca72945d2d0981299035bd9d40a08ff06e74b5b8;p=linux-2.6 [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 Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 060789e31c..39f7ddb554 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -87,8 +87,8 @@ static void __pmac_retrigger(unsigned int irq_nr) static void pmac_mask_and_ack_irq(unsigned int virq) { unsigned int src = irq_map[virq].hwirq; - unsigned long bit = 1UL << (virq & 0x1f); - int i = virq >> 5; + unsigned long bit = 1UL << (src & 0x1f); + int i = src >> 5; unsigned long flags; spin_lock_irqsave(&pmac_pic_lock, flags); @@ -175,7 +175,7 @@ static void pmac_mask_irq(unsigned int virq) spin_lock_irqsave(&pmac_pic_lock, flags); __clear_bit(src, ppc_cached_irq_mask); - __pmac_set_irq_mask(src, 0); + __pmac_set_irq_mask(src, 1); spin_unlock_irqrestore(&pmac_pic_lock, flags); }