diff options
Diffstat (limited to 'arch/mips/oprofile/op_model_mipsxx.c')
-rw-r--r-- | arch/mips/oprofile/op_model_mipsxx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index a175d673540f..dd0aec9c3ce1 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -3,12 +3,13 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2004, 2005 by Ralf Baechle | 6 | * Copyright (C) 2004, 05, 06 by Ralf Baechle |
7 | * Copyright (C) 2005 by MIPS Technologies, Inc. | 7 | * Copyright (C) 2005 by MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #include <linux/oprofile.h> | 9 | #include <linux/oprofile.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
12 | #include <asm/irq_regs.h> | ||
12 | 13 | ||
13 | #include "op_impl.h" | 14 | #include "op_impl.h" |
14 | 15 | ||
@@ -170,7 +171,7 @@ static void mipsxx_cpu_stop(void *args) | |||
170 | } | 171 | } |
171 | } | 172 | } |
172 | 173 | ||
173 | static int mipsxx_perfcount_handler(struct pt_regs *regs) | 174 | static int mipsxx_perfcount_handler(void) |
174 | { | 175 | { |
175 | unsigned int counters = op_model_mipsxx_ops.num_counters; | 176 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
176 | unsigned int control; | 177 | unsigned int control; |
@@ -184,7 +185,7 @@ static int mipsxx_perfcount_handler(struct pt_regs *regs) | |||
184 | counter = r_c0_perfcntr ## n(); \ | 185 | counter = r_c0_perfcntr ## n(); \ |
185 | if ((control & M_PERFCTL_INTERRUPT_ENABLE) && \ | 186 | if ((control & M_PERFCTL_INTERRUPT_ENABLE) && \ |
186 | (counter & M_COUNTER_OVERFLOW)) { \ | 187 | (counter & M_COUNTER_OVERFLOW)) { \ |
187 | oprofile_add_sample(regs, n); \ | 188 | oprofile_add_sample(get_irq_regs(), n); \ |
188 | w_c0_perfcntr ## n(reg.counter[n]); \ | 189 | w_c0_perfcntr ## n(reg.counter[n]); \ |
189 | handled = 1; \ | 190 | handled = 1; \ |
190 | } | 191 | } |