Commit 7dfbf1b6 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Olof Johansson

ARM: clps711x: Optimize interrupt handling

This patch modify interrupt handler for processing all penging interrupts
at once.
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent c99f72ad
...@@ -215,7 +215,7 @@ void __init clps711x_init_irq(void) ...@@ -215,7 +215,7 @@ void __init clps711x_init_irq(void)
} }
} }
inline u32 fls16(u32 x) static inline u32 fls16(u32 x)
{ {
u32 r = 15; u32 r = 15;
...@@ -239,18 +239,24 @@ inline u32 fls16(u32 x) ...@@ -239,18 +239,24 @@ inline u32 fls16(u32 x)
asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs) asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs)
{ {
u32 irqstat; do {
void __iomem *base = CLPS711X_VIRT_BASE; u32 irqstat;
void __iomem *base = CLPS711X_VIRT_BASE;
irqstat = readw_relaxed(base + INTSR1) &
readw_relaxed(base + INTMR1);
if (irqstat)
handle_IRQ(fls16(irqstat), regs);
irqstat = readw_relaxed(base + INTSR2) &
readw_relaxed(base + INTMR2);
if (irqstat) {
handle_IRQ(fls16(irqstat) + 16, regs);
continue;
}
irqstat = readl_relaxed(base + INTSR1) & readl_relaxed(base + INTMR1); break;
if (irqstat) { } while (1);
handle_IRQ(fls16(irqstat), regs);
return;
}
irqstat = readl_relaxed(base + INTSR2) & readl_relaxed(base + INTMR2);
if (likely(irqstat))
handle_IRQ(fls16(irqstat) + 16, regs);
} }
static u32 notrace clps711x_sched_clock_read(void) static u32 notrace clps711x_sched_clock_read(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment