aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/oprofile/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/oprofile/common.c')
-rw-r--r--arch/mips/oprofile/common.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
index e74732449478..a26cbe372e06 100644
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -18,6 +18,7 @@
18 18
19extern struct op_mips_model op_model_mipsxx_ops __weak; 19extern struct op_mips_model op_model_mipsxx_ops __weak;
20extern struct op_mips_model op_model_loongson2_ops __weak; 20extern struct op_mips_model op_model_loongson2_ops __weak;
21extern struct op_mips_model op_model_loongson3_ops __weak;
21 22
22static struct op_mips_model *model; 23static struct op_mips_model *model;
23 24
@@ -104,8 +105,17 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
104 case CPU_LOONGSON2: 105 case CPU_LOONGSON2:
105 lmodel = &op_model_loongson2_ops; 106 lmodel = &op_model_loongson2_ops;
106 break; 107 break;
108 case CPU_LOONGSON3:
109 lmodel = &op_model_loongson3_ops;
110 break;
107 }; 111 };
108 112
113 /*
114 * Always set the backtrace. This allows unsupported CPU types to still
115 * use timer-based oprofile.
116 */
117 ops->backtrace = op_mips_backtrace;
118
109 if (!lmodel) 119 if (!lmodel)
110 return -ENODEV; 120 return -ENODEV;
111 121
@@ -121,7 +131,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
121 ops->start = op_mips_start; 131 ops->start = op_mips_start;
122 ops->stop = op_mips_stop; 132 ops->stop = op_mips_stop;
123 ops->cpu_type = lmodel->cpu_type; 133 ops->cpu_type = lmodel->cpu_type;
124 ops->backtrace = op_mips_backtrace;
125 134
126 printk(KERN_INFO "oprofile: using %s performance monitoring.\n", 135 printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
127 lmodel->cpu_type); 136 lmodel->cpu_type);