Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v12 00/28] CoreSight: Refactor power management for CoreSight path
@ 2026-05-11 11:10 Leo Yan
  2026-05-11 11:10 ` [PATCH v12 01/28] coresight: Fix source not disabled on idr_alloc_u32 failure Leo Yan
                   ` (27 more replies)
  0 siblings, 28 replies; 32+ messages in thread
From: Leo Yan @ 2026-05-11 11:10 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Yeoreum Yun,
	Mark Rutland, Will Deacon, Yabin Cui, Keita Morisaki, Jie Gan,
	Yuanfang Zhang, Greg Kroah-Hartman, Alexander Shishkin,
	Tamas Petz, Thomas Gleixner, Peter Zijlstra
  Cc: coresight, linux-arm-kernel, Leo Yan, Mike Leach

This series focuses on CoreSight path power management.  The changes can
be divided into four parts for review:

  Patches 01 - 10: Preparison for CPU PM:
                   Fix source disabling on idr_alloc failure.
                   Fix helper enable failure handling.
                   Refactor CPU ID stored in csdev.
                   Move CPU lock to sysfs layer.
		   Move per-CPU source pointer from etm-perf to core layer.
		   Refactor etm-perf to retrieve source via per-CPU's event
		   data for lockless and get source reference during AUX
		   setup.
  Patches 11 - 13: Refactor CPU idle flow managed in the CoreSight core
                   layer.
  Patches 14 - 23: Refactor path enable / disable with range, control path
                   during CPU idle.
  Patches 24 - 25: Support the sink (TRBE) control during CPU idle.
  Patches 26 - 28: Move CPU hotplug into the core layer, and fix sysfs
                   mode for hotplug.

This series is rebased on the coresight-next branch and has been verified
on Juno-r2 (ETM + ETR) and FVP RevC (ETE + TRBE).  Built successfully
for armv7 (ARCH=arm).

---
Changes in v12:
- Added comments on coresight_{get|put)_percpu_source_ref (Suzuki).
- Refined failure handling in path enable (Suzuki).
- Added coresight_is_software_source() helper (Suzuki).
- Reordered taking ref on csdev and its parent in patch 07.
- Define the enum mode with bit flags.
- Minor improvements on commit logs.
- Rebased on lastest coresight-next.
- Link to v11: https://lore.kernel.org/r/20260501-arm_coresight_path_power_management_improvement-v11-0-fc7fb9d5af1c@arm.com

Changes in v11:
- Moved per-CPU source pointer from etm-perf to core (Suzuki).
- Added grabbing/ungrabbing csdev for device reference (Suzuki).
- Minor refine for error handling and logs in CPU PM (James).
- Refactored etm-perf with fetching path/source from event data (Suzuki).
- Fixed Helper error handling (sashiko).
- Added Jie's test tag (thanks!).
- Minor improvement for comments and commit logs.
- Link to v10: https://lore.kernel.org/r/20260405-arm_coresight_path_power_management_improvement-v10-0-13e94754a8be@arm.com

Changes in v10:
- Removed redundant checks in ETMv4 PM callbacks (sashiko).
- Added a new const structure etm4_cs_pm_ops (sashiko).
- Used fine-grained spinlock on sysfs_active_config (sashiko).
- Blocked notification after failures in save / restore to avoid lockups.
- Changed Change CPUHP_AP_ARM_CORESIGHT_STARTING to
  CPUHP_AP_ARM_CORESIGHT_ONLINE so that the CPU hotplug callback runs in
  the thread context (sashiko).
- Link to v9: https://lore.kernel.org/r/20260401-arm_coresight_path_power_management_improvement-v9-0-091d73e44072@arm.com

Signed-off-by: Leo Yan <leo.yan@arm.com>

---
Jie Gan (1):
      coresight: Fix source not disabled on idr_alloc_u32 failure

Leo Yan (26):
      coresight: Handle helper enable failure properly
      coresight: Extract device init into coresight_init_device()
      coresight: Populate CPU ID into coresight_device
      coresight: Remove .cpu_id() callback from source ops
      coresight: Take hotplug lock in enable_source_store() for Sysfs mode
      coresight: perf: Retrieve path and source from event data
      coresight: Take a reference on csdev
      coresight: Move per-CPU source pointer to core layer
      coresight: Take per-CPU source reference during AUX setup
      coresight: Register CPU PM notifier in core layer
      coresight: etm4x: Hook CPU PM callbacks
      coresight: etm4x: Remove redundant checks in PM save and restore
      coresight: syscfg: Use IRQ-safe spinlock to protect active variables
      coresight: Disable source helpers in coresight_disable_path()
      coresight: Control path with range
      coresight: Use helpers to fetch first and last nodes
      coresight: Introduce coresight_enable_source() helper
      coresight: Save active path for system tracers
      coresight: etm4x: Set active path on target CPU
      coresight: etm3x: Set active path on target CPU
      coresight: sysfs: Use source's path pointer for path control
      coresight: Control path during CPU idle
      coresight: Add PM callbacks for sink device
      coresight: sysfs: Increment refcount only for software source
      coresight: Move CPU hotplug callbacks to core layer
      coresight: sysfs: Validate CPU online status for per-CPU sources

Yabin Cui (1):
      coresight: trbe: Save and restore state across CPU low power state

 drivers/hwtracing/coresight/coresight-catu.c       |   2 +-
 drivers/hwtracing/coresight/coresight-core.c       | 548 ++++++++++++++++++---
 drivers/hwtracing/coresight/coresight-cti-core.c   |   9 +-
 drivers/hwtracing/coresight/coresight-etm-perf.c   | 285 ++++++-----
 drivers/hwtracing/coresight/coresight-etm3x-core.c |  73 +--
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 166 ++-----
 drivers/hwtracing/coresight/coresight-priv.h       |   6 +
 drivers/hwtracing/coresight/coresight-syscfg.c     |  38 +-
 drivers/hwtracing/coresight/coresight-syscfg.h     |   2 +
 drivers/hwtracing/coresight/coresight-sysfs.c      | 131 ++---
 drivers/hwtracing/coresight/coresight-trbe.c       |  61 ++-
 include/linux/coresight.h                          |  27 +-
 include/linux/cpuhotplug.h                         |   2 +-
 13 files changed, 870 insertions(+), 480 deletions(-)
---
base-commit: 0ec0a8785d21f63db520bd9d2a67c55e855d36a8
change-id: 20251104-arm_coresight_path_power_management_improvement-dab4966f8280

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



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

end of thread, other threads:[~2026-05-15 15:46 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 11:10 [PATCH v12 00/28] CoreSight: Refactor power management for CoreSight path Leo Yan
2026-05-11 11:10 ` [PATCH v12 01/28] coresight: Fix source not disabled on idr_alloc_u32 failure Leo Yan
2026-05-11 11:10 ` [PATCH v12 02/28] coresight: Handle helper enable failure properly Leo Yan
2026-05-11 11:10 ` [PATCH v12 03/28] coresight: Extract device init into coresight_init_device() Leo Yan
2026-05-11 11:10 ` [PATCH v12 04/28] coresight: Populate CPU ID into coresight_device Leo Yan
2026-05-11 11:10 ` [PATCH v12 05/28] coresight: Remove .cpu_id() callback from source ops Leo Yan
2026-05-11 11:10 ` [PATCH v12 06/28] coresight: Take hotplug lock in enable_source_store() for Sysfs mode Leo Yan
2026-05-11 11:10 ` [PATCH v12 07/28] coresight: perf: Retrieve path and source from event data Leo Yan
2026-05-11 11:10 ` [PATCH v12 08/28] coresight: Take a reference on csdev Leo Yan
2026-05-11 11:10 ` [PATCH v12 09/28] coresight: Move per-CPU source pointer to core layer Leo Yan
2026-05-11 11:10 ` [PATCH v12 10/28] coresight: Take per-CPU source reference during AUX setup Leo Yan
2026-05-11 11:10 ` [PATCH v12 11/28] coresight: Register CPU PM notifier in core layer Leo Yan
2026-05-11 11:10 ` [PATCH v12 12/28] coresight: etm4x: Hook CPU PM callbacks Leo Yan
2026-05-11 11:10 ` [PATCH v12 13/28] coresight: etm4x: Remove redundant checks in PM save and restore Leo Yan
2026-05-11 11:10 ` [PATCH v12 14/28] coresight: syscfg: Use IRQ-safe spinlock to protect active variables Leo Yan
2026-05-11 11:10 ` [PATCH v12 15/28] coresight: Disable source helpers in coresight_disable_path() Leo Yan
2026-05-11 11:11 ` [PATCH v12 16/28] coresight: Control path with range Leo Yan
2026-05-11 11:11 ` [PATCH v12 17/28] coresight: Use helpers to fetch first and last nodes Leo Yan
2026-05-11 11:11 ` [PATCH v12 18/28] coresight: Introduce coresight_enable_source() helper Leo Yan
2026-05-11 11:11 ` [PATCH v12 19/28] coresight: Save active path for system tracers Leo Yan
2026-05-15 10:54   ` Suzuki K Poulose
2026-05-15 11:18     ` Leo Yan
2026-05-11 11:11 ` [PATCH v12 20/28] coresight: etm4x: Set active path on target CPU Leo Yan
2026-05-11 11:11 ` [PATCH v12 21/28] coresight: etm3x: " Leo Yan
2026-05-11 11:11 ` [PATCH v12 22/28] coresight: sysfs: Use source's path pointer for path control Leo Yan
2026-05-11 11:11 ` [PATCH v12 23/28] coresight: Control path during CPU idle Leo Yan
2026-05-15 15:45   ` Suzuki K Poulose
2026-05-11 11:11 ` [PATCH v12 24/28] coresight: Add PM callbacks for sink device Leo Yan
2026-05-11 11:11 ` [PATCH v12 25/28] coresight: trbe: Save and restore state across CPU low power state Leo Yan
2026-05-11 11:11 ` [PATCH v12 26/28] coresight: sysfs: Increment refcount only for software source Leo Yan
2026-05-11 11:11 ` [PATCH v12 27/28] coresight: Move CPU hotplug callbacks to core layer Leo Yan
2026-05-11 11:11 ` [PATCH v12 28/28] coresight: sysfs: Validate CPU online status for per-CPU sources Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox