From: James Hogan Date: Tue, 27 Jan 2015 21:45:52 +0000 (+0000) Subject: MIPS: cevt-r4k: Make interrupt handler shared X-Git-Tag: v4.1-rc1~98^2~207 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dfe819803898c824d55a4afe3a0089861681041;p=platform%2Fkernel%2Flinux-exynos.git MIPS: cevt-r4k: Make interrupt handler shared Make the cevt-r4k interrupt handler shared so that other interrupt handlers (specifically the performance counter overflow handler and fast debug channel interrupt handler) can share the same interrupt line. This simply imvolves returning IRQ_NONE when no timer interrupt has been handled to allow other handlers to run, and passing IRQF_SHARED when setting up the IRQ handler so that other handlers (with compatible flags) can be registered. Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/9128/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 43ae718..4ceed0a 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c @@ -80,6 +80,8 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id) write_c0_compare(read_c0_compare()); cd = &per_cpu(mips_clockevent_device, cpu); cd->event_handler(cd); + } else { + return IRQ_NONE; } out: @@ -88,7 +90,11 @@ out: struct irqaction c0_compare_irqaction = { .handler = c0_compare_interrupt, - .flags = IRQF_PERCPU | IRQF_TIMER, + /* + * IRQF_SHARED: The timer interrupt may be shared with other interrupts + * such as perf counter and FDC interrupts. + */ + .flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED, .name = "timer", };