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

MIPS: Loongson-3: Adjust irq dispatch to speedup processing

This patch adjust the logic in mach_irq_dispatch(), allow multiple IPs
handled in the same dispatching. This can speedup interrupt processing.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Steven J . Hill <sjhill@realitydiluted.com>
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12891/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Huacai Chen and committed by
Ralf Baechle
24653515 d0514728

+6 -4
+6 -4
arch/mips/loongson64/loongson-3/irq.c
··· 24 24 } 25 25 } 26 26 27 + #define UNUSED_IPS (CAUSEF_IP5 | CAUSEF_IP4 | CAUSEF_IP1 | CAUSEF_IP0) 28 + 27 29 void mach_irq_dispatch(unsigned int pending) 28 30 { 29 31 if (pending & CAUSEF_IP7) 30 32 do_IRQ(LOONGSON_TIMER_IRQ); 31 33 #if defined(CONFIG_SMP) 32 - else if (pending & CAUSEF_IP6) 34 + if (pending & CAUSEF_IP6) 33 35 loongson3_ipi_interrupt(NULL); 34 36 #endif 35 - else if (pending & CAUSEF_IP3) 37 + if (pending & CAUSEF_IP3) 36 38 ht_irqdispatch(); 37 - else if (pending & CAUSEF_IP2) 39 + if (pending & CAUSEF_IP2) 38 40 do_IRQ(LOONGSON_UART_IRQ); 39 - else { 41 + if (pending & UNUSED_IPS) { 40 42 pr_err("%s : spurious interrupt\n", __func__); 41 43 spurious_interrupt(); 42 44 }