MIPS: Loongson-3: Add oprofile support
Loongson-3 has two groups of performance counters, they are 4 sub- registers of CP0's REG25. This patch add oprofile support. REG25, sel 0: Perf Control of group 0; REG25, sel 1: Perf Counter of group 0; REG25, sel 2: Perf Control of group 1; REG25, sel 3: Perf Counter of group 1. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/8328/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
3adeb2566b
commit
89467e73d3
@@ -18,6 +18,7 @@
|
||||
|
||||
extern struct op_mips_model op_model_mipsxx_ops __weak;
|
||||
extern struct op_mips_model op_model_loongson2_ops __weak;
|
||||
extern struct op_mips_model op_model_loongson3_ops __weak;
|
||||
|
||||
static struct op_mips_model *model;
|
||||
|
||||
@@ -104,6 +105,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
|
||||
case CPU_LOONGSON2:
|
||||
lmodel = &op_model_loongson2_ops;
|
||||
break;
|
||||
case CPU_LOONGSON3:
|
||||
lmodel = &op_model_loongson3_ops;
|
||||
break;
|
||||
};
|
||||
|
||||
if (!lmodel)
|
||||
|
Reference in New Issue
Block a user