Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: Fix level interrupt ACKing

Level interrupts need to be ack'd in the unmask handler, as in powerpc.
Among other issues, this bug causes the system clock to appear to run at
double-speed.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>

authored by

steve@digidescorp.com and committed by
Michal Simek
33d9ff59 833d0d8d

+9 -1
+9 -1
arch/microblaze/kernel/intc.c
··· 42 42 43 43 static void intc_enable_or_unmask(unsigned int irq) 44 44 { 45 + unsigned long mask = 1 << irq; 45 46 pr_debug("enable_or_unmask: %d\n", irq); 46 - out_be32(INTC_BASE + SIE, 1 << irq); 47 + out_be32(INTC_BASE + SIE, mask); 48 + 49 + /* ack level irqs because they can't be acked during 50 + * ack function since the handle_level_irq function 51 + * acks the irq before calling the interrupt handler 52 + */ 53 + if (irq_desc[irq].status & IRQ_LEVEL) 54 + out_be32(INTC_BASE + IAR, mask); 47 55 } 48 56 49 57 static void intc_disable_or_mask(unsigned int irq)