linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/11] CoreSight: Refactor CPU PM and hotplug
@ 2025-05-16 16:07 Leo Yan
  2025-05-16 16:07 ` [PATCH v1 01/11] coresight: etm4x: Control the trace unit in CPU suspend Leo Yan
                   ` (12 more replies)
  0 siblings, 13 replies; 26+ messages in thread
From: Leo Yan @ 2025-05-16 16:07 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Yabin Cui, coresight,
	linux-arm-kernel
  Cc: Leo Yan

Besides managing tracers (ETM) in CPU PM and hotplug flows, the
CoreSight framework is found the issues below:

Firstly, on some hardware platforms, CoreSight links (e.g., funnels and
replicators, etc) reside in a cluster power domain.  If the cluster is
powered off, the link components also will lose their context.  In this
case, Arm CoreSight drivers report errors when detect unpaired self-host
claim tags.

Secondly, if a path has been activated from per CPU's tracer (ETM) to
links and a sink in Sysfs mode, then when the CPU is hot-plugged off,
only the associated ETM will be disabled.  Afterwards, the links and the
sink always keep on and no chance to be disabled.

The last issue was reported by Yabin Cui (Google) that the TRBE driver
misses to save and restore context during CPU low power states.  As a
result, it may cause hardware lockup issue on some devices.

To resolve the power management issues, this series extends CPU power
management to cover the entire activated path, including links and
sinks.  It moves CPU PM and hotplug notifiers from the ETMv4 driver to
the CoreSight core layer.  The core layer has sufficient info to
maintain activated paths and can traverse the entire path to manipulate
CoreSight modules accordingly.

Patch 01 is to fix a bug in ETMv4 save and restore callbacks.

Patches 02 ~ 06 move CPU PM code from ETMv4 driver to the core layer, and
extends to maintain activated paths and control links.

Patches 07 and 08 support save and restore context for per-CPU sink
(TRBE).  Note, for avoid long latency, system level's sinks in an
activated path are not touched during CPU suspend and resume.

Patches 09 ~ 11 move CPU hotplug notifier from ETMv4 driver to the core
layer.  The entire path will be controlled if the corresponding CPU is
hot-plugged on or off.

This series has been verified on Hikey960 for CPUIdle and hotplug.  And
it is tested on FVP for verifying TRBE with idle states.


Leo Yan (10):
  coresight: etm4x: Control the trace unit in CPU suspend
  coresight: Set per CPU source pointer
  coresight: Register CPU PM notifier in core layer
  coresight: etm4x: Hook CPU PM callbacks
  coresight: Save activated path into source device
  coresight: Control path during CPU PM
  coresight: Add PM callbacks in sink operation
  coresight: Take hotplug lock in enable_source_store() for Sysfs mode
  coresight: Move CPU hotplug callbacks to core layer
  coresight: Manage activated paths during CPU hotplug

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

 drivers/hwtracing/coresight/coresight-core.c       | 252 +++++++++++++++++++++++++++++++++++++++++
 drivers/hwtracing/coresight/coresight-etm3x-core.c |   2 +
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 133 ++++++----------------
 drivers/hwtracing/coresight/coresight-priv.h       |   1 +
 drivers/hwtracing/coresight/coresight-sysfs.c      |  12 +-
 drivers/hwtracing/coresight/coresight-trbe.c       |  65 +++++++++++
 include/linux/coresight.h                          |  11 ++
 7 files changed, 375 insertions(+), 101 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2025-06-24 12:55 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 16:07 [PATCH v1 00/11] CoreSight: Refactor CPU PM and hotplug Leo Yan
2025-05-16 16:07 ` [PATCH v1 01/11] coresight: etm4x: Control the trace unit in CPU suspend Leo Yan
2025-06-03 13:40   ` James Clark
2025-06-04  9:48     ` Suzuki K Poulose
2025-06-04 10:50       ` James Clark
2025-06-18 14:34         ` Leo Yan
2025-05-16 16:07 ` [PATCH v1 02/11] coresight: Set per CPU source pointer Leo Yan
2025-06-03 14:12   ` James Clark
2025-06-04 10:03     ` Suzuki K Poulose
2025-05-16 16:07 ` [PATCH v1 03/11] coresight: Register CPU PM notifier in core layer Leo Yan
2025-05-16 16:07 ` [PATCH v1 04/11] coresight: etm4x: Hook CPU PM callbacks Leo Yan
2025-05-16 16:07 ` [PATCH v1 05/11] coresight: Save activated path into source device Leo Yan
2025-06-03 14:49   ` James Clark
2025-06-20 14:24     ` Leo Yan
2025-06-24 12:52       ` James Clark
2025-05-16 16:07 ` [PATCH v1 06/11] coresight: Control path during CPU PM Leo Yan
2025-06-03 14:49   ` James Clark
2025-05-16 16:07 ` [PATCH v1 07/11] coresight: Add PM callbacks in sink operation Leo Yan
2025-05-16 16:07 ` [PATCH v1 08/11] coresight: trbe: Save and restore state across CPU low power state Leo Yan
2025-05-16 16:07 ` [PATCH v1 09/11] coresight: Take hotplug lock in enable_source_store() for Sysfs mode Leo Yan
2025-06-03 15:31   ` James Clark
2025-05-16 16:07 ` [PATCH v1 10/11] coresight: Move CPU hotplug callbacks to core layer Leo Yan
2025-05-16 16:07 ` [PATCH v1 11/11] coresight: Manage activated paths during CPU hotplug Leo Yan
2025-05-16 22:40 ` [PATCH v1 00/11] CoreSight: Refactor CPU PM and hotplug Yabin Cui
2025-06-05 13:50 ` James Clark
2025-06-05 16:39   ` Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).