diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-09-01 00:27:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-01 14:39:09 -0400 |
commit | ca72945d2d0981299035bd9d40a08ff06e74b5b8 (patch) | |
tree | eb9f64c29bdebb17a686501dc54cb222072f0363 /arch/powerpc/platforms/powermac | |
parent | d565dd3b0824b67a8442df4de83cc44f7c726fc9 (diff) |
[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>
Diffstat (limited to 'arch/powerpc/platforms/powermac')
-rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 060789e31c67..39f7ddb554ea 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) | |||
87 | static void pmac_mask_and_ack_irq(unsigned int virq) | 87 | static void pmac_mask_and_ack_irq(unsigned int virq) |
88 | { | 88 | { |
89 | unsigned int src = irq_map[virq].hwirq; | 89 | unsigned int src = irq_map[virq].hwirq; |
90 | unsigned long bit = 1UL << (virq & 0x1f); | 90 | unsigned long bit = 1UL << (src & 0x1f); |
91 | int i = virq >> 5; | 91 | int i = src >> 5; |
92 | unsigned long flags; | 92 | unsigned long flags; |
93 | 93 | ||
94 | spin_lock_irqsave(&pmac_pic_lock, flags); | 94 | spin_lock_irqsave(&pmac_pic_lock, flags); |
@@ -175,7 +175,7 @@ static void pmac_mask_irq(unsigned int virq) | |||
175 | 175 | ||
176 | spin_lock_irqsave(&pmac_pic_lock, flags); | 176 | spin_lock_irqsave(&pmac_pic_lock, flags); |
177 | __clear_bit(src, ppc_cached_irq_mask); | 177 | __clear_bit(src, ppc_cached_irq_mask); |
178 | __pmac_set_irq_mask(src, 0); | 178 | __pmac_set_irq_mask(src, 1); |
179 | spin_unlock_irqrestore(&pmac_pic_lock, flags); | 179 | spin_unlock_irqrestore(&pmac_pic_lock, flags); |
180 | } | 180 | } |
181 | 181 | ||