aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/oprofile
diff options
context:
space:
mode:
authorChris Dearman <chris@mips.com>2007-05-24 17:24:20 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-06-14 13:25:15 -0400
commitffe9ee4709cf513fb80e9b7e04d214dd8b76a10d (patch)
tree07453e5644806b9c755159e5a4c1fe11dacfcab0 /arch/mips/oprofile
parentb72c05262298cc2ac92edb657f5ea3a97ad5ea3d (diff)
[MIPS] Separate performance counter interrupts
Support for performance counter overflow interrupt that is on a separate interrupt from the timer. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/oprofile')
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index 4f94fa261aae..1ea5c9c1010b 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -177,7 +177,10 @@ static int mipsxx_perfcount_handler(void)
177 unsigned int counters = op_model_mipsxx_ops.num_counters; 177 unsigned int counters = op_model_mipsxx_ops.num_counters;
178 unsigned int control; 178 unsigned int control;
179 unsigned int counter; 179 unsigned int counter;
180 int handled = 0; 180 int handled = IRQ_NONE;
181
182 if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26)))
183 return handled;
181 184
182 switch (counters) { 185 switch (counters) {
183#define HANDLE_COUNTER(n) \ 186#define HANDLE_COUNTER(n) \
@@ -188,7 +191,7 @@ static int mipsxx_perfcount_handler(void)
188 (counter & M_COUNTER_OVERFLOW)) { \ 191 (counter & M_COUNTER_OVERFLOW)) { \
189 oprofile_add_sample(get_irq_regs(), n); \ 192 oprofile_add_sample(get_irq_regs(), n); \
190 w_c0_perfcntr ## n(reg.counter[n]); \ 193 w_c0_perfcntr ## n(reg.counter[n]); \
191 handled = 1; \ 194 handled = IRQ_HANDLED; \
192 } 195 }
193 HANDLE_COUNTER(3) 196 HANDLE_COUNTER(3)
194 HANDLE_COUNTER(2) 197 HANDLE_COUNTER(2)