Commit 7dfe8198 authored by James Hogan's avatar James Hogan Committed by Ralf Baechle

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: default avatarJames 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent ea3c023e
...@@ -80,6 +80,8 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id) ...@@ -80,6 +80,8 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id)
write_c0_compare(read_c0_compare()); write_c0_compare(read_c0_compare());
cd = &per_cpu(mips_clockevent_device, cpu); cd = &per_cpu(mips_clockevent_device, cpu);
cd->event_handler(cd); cd->event_handler(cd);
} else {
return IRQ_NONE;
} }
out: out:
...@@ -88,7 +90,11 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id) ...@@ -88,7 +90,11 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id)
struct irqaction c0_compare_irqaction = { struct irqaction c0_compare_irqaction = {
.handler = c0_compare_interrupt, .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", .name = "timer",
}; };
......
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