linux-stable/arch/powerpc/perf
Paul Mackerras d40a82be2f powerpc/pmu: Make the generic compat PMU use the architected events
This changes generic-compat-pmu.c so that it only uses architected
events defined in Power ISA v3.0B, rather than event encodings which,
while common to all the IBM Power Systems implementations, are
nevertheless implementation-specific rather than architected.  The
intention is that any CPU implementation designed to conform to Power
ISA v3.0B or later can use generic-compat-pmu.c.

In addition to the existing events for cycles and instructions, this
adds several other architected events, including alternative encodings
for some events.  In order to make it possible to measure cycles and
instructions at the same time as each other, we set the CC5-6RUN bit
in MMCR0, which makes PMC5 and PMC6 count instructions and cycles
regardless of the run bit, so their events are now PM_CYC and
PM_INST_CMPL rather than PM_RUN_CYC and PM_RUN_INST_CMPL (the latter
are still available via other event codes).

Note that POWER9 has an erratum where one architected event
(PM_FLOP_CMPL, floating-point operations completed, code 0x100f4) does
not work correctly.  Given that there is a specific PMU driver for P9
which will be used in preference to generic-compat-pmu.c, that is not
a real problem.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/YJD7L9yeoxvxqeYi@thinks.paulus.ozlabs.org
2021-06-25 14:47:20 +10:00
..
req-gen powerpc: clean the inclusion of stringify.h 2018-07-30 22:48:17 +10:00
8xx-pmu.c powerpc/ppc-opcode: Add PPC_RAW_MFSPR() 2020-12-09 23:48:13 +11:00
bhrb.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
callchain.c powerpc: make stack walking KASAN-safe 2021-06-17 00:09:11 +10:00
callchain.h powerpc/64s/perf: perf interrupt does not have to get_user_pages to access user memory 2020-11-19 16:56:52 +11:00
callchain_32.c powerpc/vdso: Retrieve sigtramp offsets at buildtime 2020-12-04 01:01:17 +11:00
callchain_64.c powerpc/vdso: Retrieve sigtramp offsets at buildtime 2020-12-04 01:01:17 +11:00
core-book3s.c powerpc: Don't use 'struct ppc_inst' to reference instruction location 2021-06-17 00:09:00 +10:00
core-fsl-emb.c powerpc/perf: move perf irq/nmi handling details into traps.c 2021-02-09 00:02:10 +11:00
e500-pmu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
e6500-pmu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
generic-compat-pmu.c powerpc/pmu: Make the generic compat PMU use the architected events 2021-06-25 14:47:20 +10:00
hv-24x7-catalog.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv-24x7-domains.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv-24x7.c powerpc/perf/hv-24x7: Make some symbols static 2021-04-14 23:04:17 +10:00
hv-24x7.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv-common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv-common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv-gpci-requests.h powerpc/perf/hv-gpci: Fix starting index value 2020-10-07 22:34:48 +11:00
hv-gpci.c powerpc/hv-gpci: Add sysfs files inside hv-gpci device to show cpumask 2020-10-07 22:34:49 +11:00
hv-gpci.h powerpc/perf: consolidate GPCI hcall structs into asm/hvcall.h 2020-09-02 11:00:20 +10:00
imc-pmu.c powerpc: fix -Wimplicit-fallthrough 2020-11-18 14:18:09 -06:00
internal.h powerpc/perf: power10 Performance Monitoring support 2020-07-22 21:56:41 +10:00
isa207-common.c powerpc/perf: Fix sampled instruction type for larx/stcx 2021-04-23 01:38:02 +10:00
isa207-common.h powerpc/perf: Fix sampled instruction type for larx/stcx 2021-04-23 01:38:02 +10:00
Makefile powerpc/perf: Simplify Makefile 2021-06-15 17:12:27 +10:00
mpc7450-pmu.c powerpc/perf: Adds support for programming of Thresholding in P10 2021-02-11 23:35:36 +11:00
perf_regs.c powerpc/perf: Expose Performance Monitor Counter SPR's as part of extended regs 2021-02-09 01:09:44 +11:00
power5+-pmu.c powerpc/perf: Adds support for programming of Thresholding in P10 2021-02-11 23:35:36 +11:00
power5-pmu.c powerpc/perf: Adds support for programming of Thresholding in P10 2021-02-11 23:35:36 +11:00
power6-pmu.c powerpc/perf: Adds support for programming of Thresholding in P10 2021-02-11 23:35:36 +11:00
power7-events-list.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
power7-pmu.c powerpc/perf: Adds support for programming of Thresholding in P10 2021-02-11 23:35:36 +11:00
power8-events-list.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
power8-pmu.c powerpc/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10:00
power9-events-list.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
power9-pmu.c powerpc/perf: Add platform specific check_attr_config 2021-04-19 12:22:09 +10:00
power10-events-list.h powerpc/perf: Fix the threshold event selection for memory events in power10 2021-04-23 01:38:02 +10:00
power10-pmu.c powerpc/perf: Add platform specific check_attr_config 2021-04-19 12:22:09 +10:00
ppc970-pmu.c powerpc/perf: Adds support for programming of Thresholding in P10 2021-02-11 23:35:36 +11:00