[PATCH v6 0/4] coresight: Pulse an ETM external output for a PMU event

Amir Ayupov aaupov at fb.com
Fri Nov 20 10:54:30 PST 2026


Add the pmu_pulse configuration to drive trace-unit external output 1
with the always-true resource. A separately selected consumer can count
these pulses, for example to pause an ETM AUX tracing window.

Output 1 remains fixed in the producer configuration. Users must select
the matching trcextout1 PMU event separately; this series does not check
producer/consumer pairing. Output 0 is avoided because it is the trace
trigger and a detected trigger can stop TRBE capture.

Changes in v6, addressing Mike's replies and Sashiko's v5 reviews:
- Keep generic configuration enablement a successful no-op on devices
  that do not participate in the configuration (Mike, v5 2/7 review).
- Add cscfg_csdev_can_activate_config() and exclude unsupported ETM
  sources during AUX setup, retaining mixed-device participation (Mike).
- Validate requested TRCEVENTCTL0R event fields against the decoded
  producer event count. A one-event trace unit cannot load EVENT1;
  malformed descriptions still abort instead of being skipped
  (v5 6/7 and 7/7 reviews).
- Drop the PMU capability probe, pmuv3_event_implemented(), generic PMU
  header inclusion and capability-matching plumbing. Producer resources
  are independent of whether a PMU counts the output (Mike), and the
  ARM32 CP15 header boundary is unchanged from base (v5 5/7 review).
- Include the preload declarations in the pulse translation unit
  (v5 7/7 review).
- Drop the unrelated unused-flag cleanup and update the documentation
  to distinguish producer admission from consumer support and routing.

Patch 1 is Leo's unchanged event-count prerequisite, retaining its
review/test trailers. The materially changed patches do not carry
forward v5 review/test trailers. No ARM PMU API changes remain.

Validation: ARM32 (V7M, CPU_CP15 absent) and ARM64 CoreSight object
build with LLVM 24. Passed assertions checks with ASan/UBSan harness.

Link to v5: https://lore.kernel.org/r/cover.1795182850.git.aaupov@fb.com

Amir Ayupov (3):
  coresight: etm4x: Skip features requiring unavailable events
  coresight: perf: Filter sources lacking the selected configuration
  coresight: Add pmu_pulse/extout_pulse

Leo Yan (1):
  coresight: etm4x: Fix event count decoding

 .../trace/coresight/coresight-config.rst      |  6 +++
 .../trace/coresight/coresight-perf.rst        | 30 ++++++++++++
 drivers/hwtracing/coresight/Makefile          |  3 +-
 .../coresight/coresight-cfg-pmu-pulse.c       | 39 +++++++++++++++
 .../coresight/coresight-cfg-preload.c         |  2 +
 .../coresight/coresight-cfg-preload.h         |  2 +
 .../hwtracing/coresight/coresight-config.h    |  3 ++
 .../hwtracing/coresight/coresight-etm-perf.c  |  4 ++
 .../hwtracing/coresight/coresight-etm4x-cfg.c | 47 +++++++++++++++++--
 .../coresight/coresight-etm4x-core.c          | 13 ++++-
 .../coresight/coresight-etm4x-sysfs.c         | 29 +++++++-----
 .../hwtracing/coresight/coresight-syscfg.c    | 39 +++++++++++++++
 .../hwtracing/coresight/coresight-syscfg.h    |  2 +
 13 files changed, 199 insertions(+), 20 deletions(-)
 create mode 100644 drivers/hwtracing/coresight/coresight-cfg-pmu-pulse.c


base-commit: 343cfcbb3ecfdb80aa576a428cfa3b65ad783842
-- 
2.52.1




More information about the linux-arm-kernel mailing list