aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/oprofile/op_model_mipsxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/oprofile/op_model_mipsxx.c')
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index c3e4c18ef8d4..0a05706da9fa 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -124,6 +124,17 @@ __define_perf_accessors(perfctrl, 1, 3)
__define_perf_accessors(perfctrl, 2, 0)
__define_perf_accessors(perfctrl, 3, 1)
+
+/* These two defines are only appropriate for qemu-system-mips.
+ They prevent illegal writes to performance registers and allow
+ oprofile timer mode to continue and be initialized fully.
+
+ This should not merge to a common location, and only be applied
+ to emulated boards.
+*/
+#define w_c0_perfctrl0(reg) {}
+#define w_c0_perfcntr0(reg) {}
+
struct op_mips_model op_model_mipsxx_ops;
static struct mipsxx_register_config {
@@ -424,7 +435,9 @@ static int __init mipsxx_init(void)
}
save_perf_irq = perf_irq;
+#if 0
perf_irq = mipsxx_perfcount_handler;
+#endif
if (get_c0_perfcount_int)
perfcount_irq = get_c0_perfcount_int();