aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/oprofile
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-12-09 07:29:38 -0500
committer <ralf@denk.linux-mips.net>2006-01-10 08:39:07 -0500
commitba339c03e2e8ede8ccd37ed6c4e564e3b1545495 (patch)
tree1a7bbfd15a9c46d5300d2d5a1890d748b81dbce2 /arch/mips/oprofile
parent0401572a9b9b2f368176b6e53f53004fd048a566 (diff)
MIPS: Oprofile: Fixup the loose ends in the plumbing.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/oprofile')
-rw-r--r--arch/mips/oprofile/op_impl.h4
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/mips/oprofile/op_impl.h b/arch/mips/oprofile/op_impl.h
index f0121557047d..5cfce7d87a4d 100644
--- a/arch/mips/oprofile/op_impl.h
+++ b/arch/mips/oprofile/op_impl.h
@@ -12,8 +12,8 @@
12 12
13struct pt_regs; 13struct pt_regs;
14 14
15extern void null_perf_irq(struct pt_regs *regs); 15extern int null_perf_irq(struct pt_regs *regs);
16extern void (*perf_irq)(struct pt_regs *regs); 16extern int (*perf_irq)(struct pt_regs *regs);
17 17
18/* Per-counter configuration as set via oprofilefs. */ 18/* Per-counter configuration as set via oprofilefs. */
19struct op_counter_config { 19struct op_counter_config {
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index d36b64dfcb2f..a4a4aa99ab03 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -114,11 +114,12 @@ static void mipsxx_cpu_stop(void *args)
114 } 114 }
115} 115}
116 116
117static void mipsxx_perfcount_handler(struct pt_regs *regs) 117static int mipsxx_perfcount_handler(struct pt_regs *regs)
118{ 118{
119 unsigned int counters = op_model_mipsxx.num_counters; 119 unsigned int counters = op_model_mipsxx.num_counters;
120 unsigned int control; 120 unsigned int control;
121 unsigned int counter; 121 unsigned int counter;
122 int handled = 0;
122 123
123 switch (counters) { 124 switch (counters) {
124#define HANDLE_COUNTER(n) \ 125#define HANDLE_COUNTER(n) \
@@ -129,12 +130,15 @@ static void mipsxx_perfcount_handler(struct pt_regs *regs)
129 (counter & M_COUNTER_OVERFLOW)) { \ 130 (counter & M_COUNTER_OVERFLOW)) { \
130 oprofile_add_sample(regs, n); \ 131 oprofile_add_sample(regs, n); \
131 write_c0_perfcntr ## n(reg.counter[n]); \ 132 write_c0_perfcntr ## n(reg.counter[n]); \
133 handled = 1; \
132 } 134 }
133 HANDLE_COUNTER(3) 135 HANDLE_COUNTER(3)
134 HANDLE_COUNTER(2) 136 HANDLE_COUNTER(2)
135 HANDLE_COUNTER(1) 137 HANDLE_COUNTER(1)
136 HANDLE_COUNTER(0) 138 HANDLE_COUNTER(0)
137 } 139 }
140
141 return handled;
138} 142}
139 143
140#define M_CONFIG1_PC (1 << 4) 144#define M_CONFIG1_PC (1 << 4)