linux-sg2042/arch/powerpc/perf
Athira Rajeev 82715a0f33 powerpc/perf: Fix reading of MSR[HV/PR] bits in trace-imc
IMC trace-mode uses MSR[HV/PR] bits to set the cpumode for the
instruction pointer captured in each sample. The bits are fetched from
the third double word of the trace record. Reading third double word
from IMC trace record should use be64_to_cpu() along with READ_ONCE
inorder to fetch correct MSR[HV/PR] bits. Patch addresses this change.

Currently we are using PERF_RECORD_MISC_HYPERVISOR as cpumode if MSR
HV is 1 and PR is 0 which means the address is from host counter. But
using PERF_RECORD_MISC_HYPERVISOR for host counter data will fail to
resolve the address -> symbol during "perf report" because perf tools
side uses PERF_RECORD_MISC_KERNEL to represent the host counter data.
Therefore, fix the trace imc sample data to use
PERF_RECORD_MISC_KERNEL as cpumode for host kernel information.

Fixes: 77ca3951cc ("powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1598424029-1662-1-git-send-email-atrajeev@linux.vnet.ibm.com
2020-08-27 17:41:45 +10:00
..
req-gen powerpc: clean the inclusion of stringify.h 2018-07-30 22:48:17 +10:00
8xx-pmu.c powerpc/8xx: Remove now unused TLB miss functions 2020-05-26 22:22:22 +10:00
Makefile powerpc/perf: power10 Performance Monitoring support 2020-07-22 21:56:41 +10:00
bhrb.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
callchain.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
callchain.h powerpc/perf: Consolidate perf_callchain_user_[64|32]() 2020-07-30 22:53:49 +10:00
callchain_32.c powerpc/perf: Consolidate perf_callchain_user_[64|32]() 2020-07-30 22:53:49 +10:00
callchain_64.c powerpc/perf: Consolidate perf_callchain_user_[64|32]() 2020-07-30 22:53:49 +10:00
core-book3s.c powerpc/perf: Fix crashes with generic_compat_pmu & BHRB 2020-08-27 17:41:44 +10:00
core-fsl-emb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07: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/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +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: Move cpumask file to top folder of hv-24x7 driver 2020-08-21 23:35:27 +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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv-gpci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hv-gpci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
imc-pmu.c powerpc/perf: Fix reading of MSR[HV/PR] bits in trace-imc 2020-08-27 17:41:45 +10:00
internal.h powerpc/perf: power10 Performance Monitoring support 2020-07-22 21:56:41 +10:00
isa207-common.c powerpc/perf: BHRB control to disable BHRB logic when not used 2020-07-22 21:56:42 +10:00
isa207-common.h powerpc/perf: power10 Performance Monitoring support 2020-07-22 21:56:41 +10:00
mpc7450-pmu.c powerpc/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10:00
perf_regs.c powerpc/perf: Add extended regs support for power10 platform 2020-08-17 13:11:22 +10:00
power5+-pmu.c powerpc/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10:00
power5-pmu.c powerpc/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10:00
power6-pmu.c powerpc/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10: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: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10: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 support for outputting extended regs in perf intr_regs 2020-08-17 13:11:22 +10:00
power10-events-list.h powerpc/perf: power10 Performance Monitoring support 2020-07-22 21:56:41 +10:00
power10-pmu.c powerpc/perf: Add extended regs support for power10 platform 2020-08-17 13:11:22 +10:00
ppc970-pmu.c powerpc/perf: Update Power PMU cache_events to u64 type 2020-07-22 21:56:40 +10:00