diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-07-21 15:43:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-21 15:43:06 -0400 |
commit | 9dcdbf7a33d9018ac5d45debcf261be648bdd56a (patch) | |
tree | bbcc1a018f11ff76cd7ce174ef3ffe2c02da07ee /arch/mips/oprofile/op_model_loongson2.c | |
parent | cc5edb0eb9ce892b530e34a5d110382483587942 (diff) | |
parent | cd5b8f8755a89a57fc8c408d284b8b613f090345 (diff) |
Merge branch 'linus' into perf/core
Merge reason: Pick up the latest perf fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/mips/oprofile/op_model_loongson2.c')
-rw-r--r-- | arch/mips/oprofile/op_model_loongson2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c index d0d24e047676..60d3ea602118 100644 --- a/arch/mips/oprofile/op_model_loongson2.c +++ b/arch/mips/oprofile/op_model_loongson2.c | |||
@@ -43,6 +43,12 @@ static struct loongson2_register_config { | |||
43 | static char *oprofid = "LoongsonPerf"; | 43 | static char *oprofid = "LoongsonPerf"; |
44 | static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id); | 44 | static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id); |
45 | 45 | ||
46 | static void reset_counters(void *arg) | ||
47 | { | ||
48 | write_c0_perfctrl(0); | ||
49 | write_c0_perfcnt(0); | ||
50 | } | ||
51 | |||
46 | static void loongson2_reg_setup(struct op_counter_config *cfg) | 52 | static void loongson2_reg_setup(struct op_counter_config *cfg) |
47 | { | 53 | { |
48 | unsigned int ctrl = 0; | 54 | unsigned int ctrl = 0; |
@@ -139,7 +145,7 @@ static int __init loongson2_init(void) | |||
139 | 145 | ||
140 | static void loongson2_exit(void) | 146 | static void loongson2_exit(void) |
141 | { | 147 | { |
142 | write_c0_perfctrl(0); | 148 | reset_counters(NULL); |
143 | free_irq(LOONGSON2_PERFCNT_IRQ, oprofid); | 149 | free_irq(LOONGSON2_PERFCNT_IRQ, oprofid); |
144 | } | 150 | } |
145 | 151 | ||