public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v10 00/20] CoreSight: Refactor power management for CoreSight path
@ 2026-04-05 15:02 Leo Yan
  2026-04-05 15:02 ` [PATCH v10 01/20] coresight: Extract device init into coresight_init_device() Leo Yan
                   ` (19 more replies)
  0 siblings, 20 replies; 30+ messages in thread
From: Leo Yan @ 2026-04-05 15:02 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Yeoreum Yun,
	Mark Rutland, Will Deacon, Yabin Cui, Keita Morisaki,
	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 - 04: Refactor the CPU ID storing in csdev, later patches
                   consume csdev->cpu.  Move CPU lock to sysfs layer so
		   it is safe for later changes.
  Patches 05 - 09: Refactor the CPU idle flow with moving common code into
                   the CoreSight core layer.
  Patches 10 - 15: Refactor path enabling and disabling with range, add
                   path control during CPU idle.
  Patches 16 - 17: Support the sink (TRBE) control during CPU idle.
  Patches 18 - 20: 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 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

Changes in v9:
- Changed to use per-CPU path pointer with lockless access.
- Removed the change for adding csdev->path, the related refactoring
  will be sent separately.
- Re-orged patches to avoid intermediate breakage (sashiko).
- Link to v8: https://lore.kernel.org/r/20260325-arm_coresight_path_power_management_improvement-v8-0-7b1902e18041@arm.com

Changes in v8:
- Moved the "cpu" field in coresight_device for better pack with new
  patch 01 (Suzuki).
- Added check if not set CPU for per_cpu_source/per_cpu_sink (Suzuki).
- Renamed spinlock name in syscfg (Suzuki).
- Refactored paired enable and disable path with new patches
  10 and 12 (Suzuki).
- Link to v7: https://lore.kernel.org/r/20260320-arm_coresight_path_power_management_improvement-v7-0-327ddd36b58b@arm.com

Changes in v7:
- Added a flag in coresight_desc to indicate CPU bound device (Suzuki).
- Used coresight_mutex to protect per-CPU source pointer (Suzuki).
- Added a spinlock for exclusive access per-CPU source pointer (Suzuki).
- Dropped .pm_is_needed() callback (Suzuki).
- Supported range in path enabling / disabling (Suzuki).
- Gathered test and review tags (Levi / James).
- Link to v6: https://lore.kernel.org/r/20260305-arm_coresight_path_power_management_improvement-v6-0-eff765d211a9@arm.com

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

---
Leo Yan (19):
      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: etm4x: Set per-CPU path on local CPU
      coresight: etm3x: Set per-CPU path on local CPU
      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: Move source helper disabling to coresight_disable_path()
      coresight: Control path with range
      coresight: Use helpers to fetch first and last nodes
      coresight: Introduce coresight_enable_source() helper
      coresight: Control path during CPU idle
      coresight: Add PM callbacks for sink device
      coresight: sysfs: Increment refcount only for system tracers
      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       | 419 ++++++++++++++++++---
 drivers/hwtracing/coresight/coresight-cti-core.c   |   9 +-
 drivers/hwtracing/coresight/coresight-etm-perf.c   |   4 +-
 drivers/hwtracing/coresight/coresight-etm3x-core.c |  73 +---
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 168 ++-------
 drivers/hwtracing/coresight/coresight-priv.h       |   4 +
 drivers/hwtracing/coresight/coresight-syscfg.c     |  35 +-
 drivers/hwtracing/coresight/coresight-syscfg.h     |   2 +
 drivers/hwtracing/coresight/coresight-sysfs.c      |  50 ++-
 drivers/hwtracing/coresight/coresight-trbe.c       |  61 ++-
 include/linux/coresight.h                          |  13 +-
 include/linux/cpuhotplug.h                         |   2 +-
 13 files changed, 566 insertions(+), 276 deletions(-)
---
base-commit: ec687ba84000d7d50cf243558041f6729d1d8119
change-id: 20251104-arm_coresight_path_power_management_improvement-dab4966f8280

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



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

end of thread, other threads:[~2026-04-09 15:54 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-05 15:02 [PATCH v10 00/20] CoreSight: Refactor power management for CoreSight path Leo Yan
2026-04-05 15:02 ` [PATCH v10 01/20] coresight: Extract device init into coresight_init_device() Leo Yan
2026-04-05 15:02 ` [PATCH v10 02/20] coresight: Populate CPU ID into coresight_device Leo Yan
2026-04-05 15:02 ` [PATCH v10 03/20] coresight: Remove .cpu_id() callback from source ops Leo Yan
2026-04-05 15:02 ` [PATCH v10 04/20] coresight: Take hotplug lock in enable_source_store() for Sysfs mode Leo Yan
2026-04-05 15:02 ` [PATCH v10 05/20] coresight: etm4x: Set per-CPU path on local CPU Leo Yan
2026-04-05 15:02 ` [PATCH v10 06/20] coresight: etm3x: " Leo Yan
2026-04-05 15:02 ` [PATCH v10 07/20] coresight: Register CPU PM notifier in core layer Leo Yan
2026-04-05 15:02 ` [PATCH v10 08/20] coresight: etm4x: Hook CPU PM callbacks Leo Yan
2026-04-05 15:02 ` [PATCH v10 09/20] coresight: etm4x: Remove redundant checks in PM save and restore Leo Yan
2026-04-05 15:02 ` [PATCH v10 10/20] coresight: syscfg: Use IRQ-safe spinlock to protect active variables Leo Yan
2026-04-05 15:02 ` [PATCH v10 11/20] coresight: Move source helper disabling to coresight_disable_path() Leo Yan
2026-04-05 15:02 ` [PATCH v10 12/20] coresight: Control path with range Leo Yan
2026-04-05 15:02 ` [PATCH v10 13/20] coresight: Use helpers to fetch first and last nodes Leo Yan
2026-04-05 15:02 ` [PATCH v10 14/20] coresight: Introduce coresight_enable_source() helper Leo Yan
2026-04-05 15:02 ` [PATCH v10 15/20] coresight: Control path during CPU idle Leo Yan
2026-04-05 15:02 ` [PATCH v10 16/20] coresight: Add PM callbacks for sink device Leo Yan
2026-04-09 10:52   ` James Clark
2026-04-09 12:54     ` James Clark
2026-04-09 13:14     ` Suzuki K Poulose
2026-04-09 14:30       ` James Clark
2026-04-09 14:31         ` James Clark
2026-04-09 14:49         ` Leo Yan
2026-04-09 15:44     ` Leo Yan
2026-04-05 15:02 ` [PATCH v10 17/20] coresight: trbe: Save and restore state across CPU low power state Leo Yan
2026-04-09 10:52   ` James Clark
2026-04-09 15:54     ` Leo Yan
2026-04-05 15:02 ` [PATCH v10 18/20] coresight: sysfs: Increment refcount only for system tracers Leo Yan
2026-04-05 15:02 ` [PATCH v10 19/20] coresight: Move CPU hotplug callbacks to core layer Leo Yan
2026-04-05 15:02 ` [PATCH v10 20/20] 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