mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
perf list picks the events supported for specific platform
from pmu-events/arch/powerpc/<platform>. Example power10 events
are in pmu-events/arch/powerpc/power10, power9 events are part
of pmu-events/arch/powerpc/power9. The decision of which
platform to pick is determined based on PVR value in powerpc.
The PVR value is matched from pmu-events/arch/powerpc/mapfile.csv
Example:
Format:
PVR,Version,JSON/file/pathname,Type
0x004[bcd][[:xdigit:]]{4},1,power8,core
0x0066[[:xdigit:]]{4},1,power8,core
0x004e[[:xdigit:]]{4},1,power9,core
0x0080[[:xdigit:]]{4},1,power10,core
0x0082[[:xdigit:]]{4},1,power10,core
The code gets the PVR from system using get_cpuid_str function
in arch/powerpc/util/headers.c ( from SPRN_PVR ) and compares
with value from mapfile.csv
In case of compat mode, say when partition is booted in a power9
mode when the system is a power10, add an entry to pick the
ISA architected events from "pmu-events/arch/powerpc/compat".
Add json file generic-events.json which will contain these
events which is supported in compat mode.
Suggested-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Cc: akanksha@linux.ibm.com
Cc: hbathini@linux.ibm.com
Cc: kjain@linux.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20241010145107.51211-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
558 B
558 B
| 1 | # Format: |
|---|---|
| 2 | # PVR,Version,JSON/file/pathname,Type |
| 3 | # |
| 4 | # where |
| 5 | # PVR Processor version |
| 6 | # Version could be used to track version of JSON file |
| 7 | # but currently unused. |
| 8 | # JSON/file/pathname is the path to JSON file, relative |
| 9 | # to tools/perf/pmu-events/arch/powerpc/. |
| 10 | # Type is core, uncore etc |
| 11 | # |
| 12 | # Multiple PVRs could map to a single JSON file. |
| 13 | # |
| 14 | 0x004[bcd][[:xdigit:]]{4},1,power8,core |
| 15 | 0x0066[[:xdigit:]]{4},1,power8,core |
| 16 | 0x004e[[:xdigit:]]{4},1,power9,core |
| 17 | 0x0080[[:xdigit:]]{4},1,power10,core |
| 18 | 0x0082[[:xdigit:]]{4},1,power10,core |
| 19 | 0x00ffffff,1,compat,core |