]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Use PVR rather than oprofile field to determine CPU version
authorRashmica Gupta <rashmica.g@gmail.com>
Thu, 7 Jul 2022 14:37:17 +0000 (16:37 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Jul 2022 11:36:05 +0000 (21:36 +1000)
commitaef7de9e744a7671e5b94b246c5bc94a56e0be15
tree33ee98c9e5c4436c6b83dd8e678e22533a3447a1
parent19eaeef52975565633910db27977c8131ecdde37
powerpc/perf: Use PVR rather than oprofile field to determine CPU version

Currently the perf CPU backend drivers detect what CPU they're on using
cur_cpu_spec->oprofile_cpu_type.

Although that works, it's a bit crufty to be using oprofile related fields,
especially seeing as oprofile is more or less unused these days.

It also means perf is reliant on the fragile logic in setup_cpu_spec()
which detects when we're using a logical PVR and copies back the PMU
related fields from the raw CPU entry. So lets check the PVR directly.

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
[chleroy: Added power10 and fixed checkpatch issues]
Reviewed-and-tested-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-and-tested-By: Kajol Jain <kjain@linux.ibm.com> [For 24x7 side changes]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20c0ee7f99dbf0dbf8658df6b39f84753e6db1ef.1657204631.git.christophe.leroy@csgroup.eu
12 files changed:
arch/powerpc/perf/e500-pmu.c
arch/powerpc/perf/e6500-pmu.c
arch/powerpc/perf/hv-24x7.c
arch/powerpc/perf/mpc7450-pmu.c
arch/powerpc/perf/power10-pmu.c
arch/powerpc/perf/power5+-pmu.c
arch/powerpc/perf/power5-pmu.c
arch/powerpc/perf/power6-pmu.c
arch/powerpc/perf/power7-pmu.c
arch/powerpc/perf/power8-pmu.c
arch/powerpc/perf/power9-pmu.c
arch/powerpc/perf/ppc970-pmu.c