aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-01-27 16:45:52 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-03-31 06:04:12 -0400
commit7dfe819803898c824d55a4afe3a0089861681041 (patch)
treed000a2afda8bbd2a9f9c62ad98720adb5451d8c8
parentea3c023ebf7130d72f9f00a3992c22176ef6703b (diff)
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 <james.hogan@imgtec.com> 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 <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/cevt-r4k.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c
index 43ae71870797..4ceed0a66856 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)
80 write_c0_compare(read_c0_compare()); 80 write_c0_compare(read_c0_compare());
81 cd = &per_cpu(mips_clockevent_device, cpu); 81 cd = &per_cpu(mips_clockevent_device, cpu);
82 cd->event_handler(cd); 82 cd->event_handler(cd);
83 } else {
84 return IRQ_NONE;
83 } 85 }
84 86
85out: 87out:
@@ -88,7 +90,11 @@ out:
88 90
89struct irqaction c0_compare_irqaction = { 91struct irqaction c0_compare_irqaction = {
90 .handler = c0_compare_interrupt, 92 .handler = c0_compare_interrupt,
91 .flags = IRQF_PERCPU | IRQF_TIMER, 93 /*
94 * IRQF_SHARED: The timer interrupt may be shared with other interrupts
95 * such as perf counter and FDC interrupts.
96 */
97 .flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED,
92 .name = "timer", 98 .name = "timer",
93}; 99};
94 100