linux/arch/powerpc/perf
Shivani Nittor 131717e656 powerpc/perf: Update check for PERF_SAMPLE_DATA_SRC marked events
The core-book3s PMU sampling code validates the SIER TYPE field
when PERF_SAMPLE_DATA_SRC is requested. The SIER TYPE field
indicates the instruction type and is only valid for
random sampling (marked events). To handle cases observed where
SIER TYPE could be zero even for marked events,validation was
added to drop such samples and increment event->lost_samples.

However, this validation was applied to all samples,
including continuous sampling. In continuous sampling mode,
the PMU does not set the SIER TYPE field, so it remains zero.
As a result, valid continuous samples were incorrectly
treated as invalid and dropped. Fixed this by gating the
SIER TYPE validation with mark_event, so the check runs only
for marked (random) events. Continuous samples now skip this
check and are recorded normally in the final data recording path.

Fixes: 2ffb26afa6 ("arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src")
Signed-off-by: Shivani Nittor <shivani@linux.ibm.com>
Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Reviewed-by: Athira Rajeev <atrajeev@linux.ibm.com>
[Maddy: Fixed reviewed-by tag]
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260421150628.96500-1-shivani@linux.ibm.com
2026-05-06 07:38:10 +05:30
..
req-gen powerpc/hv-gpci: Fix hv_gpci event list 2022-12-02 20:39:26 +11:00
8xx-pmu.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
bhrb.S powerpc/64: asm use consistent global variable declaration and access 2022-09-28 19:22:12 +10:00
callchain_32.c powerpc, perf: Check that current->mm is alive before getting user callchain 2026-03-12 11:02:55 +05:30
callchain_64.c powerpc, perf: Check that current->mm is alive before getting user callchain 2026-03-12 11:02:55 +05:30
callchain.c powerpc, perf: Check that current->mm is alive before getting user callchain 2026-03-12 11:02:55 +05:30
callchain.h powerpc/64s/hash: Make hash faults work in NMI context 2022-02-24 12:46:54 +11:00
core-book3s.c powerpc/perf: Update check for PERF_SAMPLE_DATA_SRC marked events 2026-05-06 07:38:10 +05:30
core-fsl-emb.c powerpc/perf: Remove driver-specific throttle support 2025-05-21 13:57:44 +02:00
e500-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
e6500-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
generic-compat-pmu.c powerpc/perf: Add support for caps under sysfs in powerpc 2022-07-18 10:39:54 +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 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08: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/hv-gpci: Fix hv_gpci event list 2022-12-02 20:39:26 +11:00
hv-gpci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hv-gpci.h powerpc/hv-gpci: Fix hv_gpci event list 2022-12-02 20:39:26 +11:00
imc-pmu.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
internal.h powerpc/perf: Power11 Performance Monitoring support 2024-02-21 23:11:00 +11:00
isa207-common.c arch/powerpc/perf: Update get_mem_data_src function to use saved values of sier and mmcra regs 2025-02-11 11:33:11 +05:30
isa207-common.h powerpc/perf: Update MMCR2 to support event exclude_idle 2022-06-29 19:42:41 +10:00
kvm-hv-pmu.c powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters 2025-04-16 22:16:10 +05:30
Makefile powerpc/vpa_dtl: Add interface to expose vpa dtl counters via perf 2025-09-22 14:48:57 +05:30
mpc7450-pmu.c powerpc/perf: Properly detect mpc7450 family 2023-03-30 23:35:43 +11:00
perf_regs.c powerpc: Use the newly added is_tsk_32bit_task() macro 2022-02-12 22:47:42 +11:00
power5-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power5+-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power6-pmu.c powerpc/perf: Optimize find_alternatives_list() using binary search 2023-10-19 23:18:59 +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: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +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: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +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: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
power10-events-list.h powerpc/perf: Fix cycles/instructions as PM_CYC/PM_INST_CMPL in power10 2021-10-14 21:46:45 +11:00
power10-pmu.c powerpc/perf: Set cpumode flags using sample address 2024-06-17 22:47:16 +10:00
ppc970-pmu.c powerpc/perf: Use PVR rather than oprofile field to determine CPU version 2022-07-27 21:36:05 +10:00
vpa-dtl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vpa-pmu.c powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu' 2025-03-07 20:15:49 +05:30