[PATCH v2 0/2] perf: arm_spe: Fix trace disabling for invalid limits

Leo Yan leo.yan at arm.com
Mon Nov 10 08:28:30 PST 2025


This series fixes trace disabling issues that occur when failed to
calculate a valid limit (E.g., due to buffer overflow or insufficient
space during padding).

The first patch improves arm_spe_perf_aux_output_begin() for failure
handling, ensuring that all failure cases set the PERF_HES_STOPPED
flag.

The second patch applies the profiling buffer disable flow in the
interrupt handler when the PERF_HES_STOPPED flag has been set.

This series has been verified on Orion6 board.

Signed-off-by: Leo Yan <leo.yan at arm.com>
---
Changes in v2:
- Added the patch 01.
- Did not rely on irq work for disabling as the disable callback will
  skip operations after PERF_HES_STOPPED flag has been set.
- Link to v1: https://lore.kernel.org/r/20251015-arm_spe_fix_truncated_flag-v1-1-555e328cba05@arm.com

---
Leo Yan (2):
      perf: arm_spe: Correct setting the PERF_HES_STOPPED flag
      perf: arm_spe: Ensure profiling buffer is properly disabled

 drivers/perf/arm_spe_pmu.c | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
---
base-commit: e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
change-id: 20251015-arm_spe_fix_truncated_flag-1a5b3620a3ab

Best regards,
-- 
Leo Yan <leo.yan at arm.com>




More information about the linux-arm-kernel mailing list