All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/4] coresight: Pulse an ETM external output for a PMU event
@ 2026-11-20 18:54 Amir Ayupov
  2026-11-20 18:54 ` [PATCH v6 1/4] coresight: etm4x: Fix event count decoding Amir Ayupov
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Amir Ayupov @ 2026-11-20 18:54 UTC (permalink / raw)
  To: James Clark, Leo Yan, Suzuki K Poulose, Mike Leach,
	Alexander Shishkin
  Cc: Will Deacon, Mark Rutland, Greg Kroah-Hartman, Jonathan Corbet,
	Mathieu Poirier, Randy Dunlap, Shuah Khan, Daniel Pereira,
	coresight, linux-arm-kernel, linux-perf-users, linux-doc,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-20 19:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 18:54 [PATCH v6 0/4] coresight: Pulse an ETM external output for a PMU event Amir Ayupov
2026-11-20 18:54 ` [PATCH v6 1/4] coresight: etm4x: Fix event count decoding Amir Ayupov
2026-11-20 19:03   ` sashiko-bot
2026-11-20 18:54 ` [PATCH v6 2/4] coresight: etm4x: Skip features requiring unavailable events Amir Ayupov
2026-11-20 19:16   ` sashiko-bot
2026-11-20 18:54 ` [PATCH v6 3/4] coresight: perf: Filter sources lacking the selected configuration Amir Ayupov
2026-11-20 19:05   ` sashiko-bot
2026-11-20 18:54 ` [PATCH v6 4/4] coresight: Add pmu_pulse/extout_pulse Amir Ayupov
2026-11-20 19:02   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.