aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-01-27 16:45:54 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-03-31 06:04:12 -0400
commit369a93bbc78dd7848d433d60e3c88a0c698dde57 (patch)
tree311c0e020d1b23aeac3daee38706ba9df35329ff
parenta1ec0e18833088673d2bdfe6e89b67b4f6ab00d7 (diff)
MIPS: OProfile: Allow sharing IRQ with timer
When requesting the performance counter overflow interrupt, pass flags which are compatible with the cevt-r4k driver, in particular IRQF_SHARED so that the two handlers can share the same IRQ. This is possible since release 2 of the architecture where there are separate pending interrupt bits for the timer interrupt and the performance counter interrupt. This will be necessary since the FDC interrupt can also be arbitrarily routed to a CPU interrupt, possibly sharing with the timer, the performance counters, or both, and it isn't scalable to have all the handlers able to call other handlers that may be on the same IRQ line. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Robert Richter <rric@kernel.org> Cc: linux-mips@linux-mips.org Cc: oprofile-list@lists.sf.net Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/9130/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index 24729f023d93..d6b9e69e7c69 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -442,7 +442,10 @@ static int __init mipsxx_init(void)
442 442
443 if (perfcount_irq >= 0) 443 if (perfcount_irq >= 0)
444 return request_irq(perfcount_irq, mipsxx_perfcount_int, 444 return request_irq(perfcount_irq, mipsxx_perfcount_int,
445 0, "Perfcounter", save_perf_irq); 445 IRQF_PERCPU | IRQF_NOBALANCING |
446 IRQF_NO_THREAD | IRQF_NO_SUSPEND |
447 IRQF_SHARED,
448 "Perfcounter", save_perf_irq);
446 449
447 return 0; 450 return 0;
448} 451}