linux/arch/x86/events/amd
Breno Leitao 263f5ecaf7 perf/x86/amd/core: Always clear status for idx
The variable 'status' (which contains the unhandled overflow bits) is
not being properly masked in some cases, displaying the following
warning:

  WARNING: CPU: 156 PID: 475601 at arch/x86/events/amd/core.c:972 amd_pmu_v2_handle_irq+0x216/0x270

This seems to be happening because the loop is being continued before
the status bit being unset, in case x86_perf_event_set_period()
returns 0. This is also causing an inconsistency because the "handled"
counter is incremented, but the status bit is not cleaned.

Move the bit cleaning together above, together when the "handled"
counter is incremented.

Fixes: 7685665c39 ("perf/x86/amd/core: Add PerfMonV2 overflow handling")
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Sandipan Das <sandipan.das@amd.com>
Link: https://lore.kernel.org/r/20230321113338.1669660-1-leitao@debian.org
2023-03-21 14:43:05 +01:00
..
brs.c x86/perf/amd: Remove tracing from perf_lopwr_cb() 2023-01-13 11:03:21 +01:00
core.c perf/x86/amd/core: Always clear status for idx 2023-03-21 14:43:05 +01:00
ibs.c perf/core: Add perf_sample_save_raw_data() helper 2023-01-18 11:57:19 +01:00
iommu.c x86/events/amd/iommu: Remove redundant assignment to variable shift 2021-12-28 21:30:05 +01:00
iommu.h IOMMU Updates for Linux v5.13 2021-05-01 09:33:00 -07:00
lbr.c perf: Rewrite core context handling 2022-10-27 20:12:16 +02:00
Makefile perf/x86/amd/lbr: Detect LbrExtV2 support 2022-08-27 00:05:43 +02:00
power.c perf/x86/amd/power: Assign pmu.module 2021-08-26 09:12:57 +02:00
uncore.c perf/x86/amd/uncore: Fix memory leak for events array 2022-11-09 12:38:01 +01:00