MIPS: perf: More robustly probe for the presence of per-tc counters
The presence of per TC performance counters is now detected by cpu-probe.c and indicated by MIPS_CPU_MT_PER_TC_PERF_COUNTERS in cpu_data. Switch detection of the feature to use this new flag rather than blindly testing the implementation specific config7 register with a magic number. Signed-off-by: Matt Redfearn <matt.redfearn@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Maciej W. Rozycki <macro@mips.com> Cc: Paul Burton <paul.burton@mips.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Robert Richter <rric@kernel.org> Cc: linux-mips@linux-mips.org Cc: oprofile-list@lists.sf.net Patchwork: https://patchwork.linux-mips.org/patch/19142/ Signed-off-by: James Hogan <jhogan@kernel.org>
This commit is contained in:

committed by
James Hogan

parent
8270ab48e6
commit
800fb71281
@@ -36,7 +36,6 @@ static int perfcount_irq;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MIPS_MT_SMP
|
||||
static int cpu_has_mipsmt_pertccounters;
|
||||
#define WHAT (MIPS_PERFCTRL_MT_EN_VPE | \
|
||||
M_PERFCTL_VPEID(cpu_vpe_id(¤t_cpu_data)))
|
||||
#define vpe_id() (cpu_has_mipsmt_pertccounters ? \
|
||||
@@ -326,7 +325,6 @@ static int __init mipsxx_init(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIPS_MT_SMP
|
||||
cpu_has_mipsmt_pertccounters = read_c0_config7() & (1<<19);
|
||||
if (!cpu_has_mipsmt_pertccounters)
|
||||
counters = counters_total_to_per_cpu(counters);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user