public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] coresight: Separate sysfs and Perf usage and some other cleanups
@ 2023-12-12 15:53 James Clark
  2023-12-12 15:53 ` [PATCH 1/8] coresight: Fix issue where a source device's helpers aren't disabled James Clark
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: James Clark @ 2023-12-12 15:53 UTC (permalink / raw)
  To: coresight, suzuki.poulose
  Cc: James Clark, Mike Leach, Alexander Shishkin, Maxime Coquelin,
	Alexandre Torgue, linux-arm-kernel, linux-kernel, linux-stm32

I've been finding it quite difficult to reason about some of the state
and functions in coresight-core.c because they have generic names when
they are actually only relevant to the sysfs usage of Coresight rather
than usage through Perf. This is probably because sysfs came first and
Perf was added later. This has caused a couple of issues where these
things have been used in the wrong context, for example the first
commit is a fixup.

To fix this I've mainly just moved all of the sysfs stuff to the sysfs
file and removed the 'enable' state, which was just for sysfs. While
doing the refactor it became obvious that refcnt didn't need to be
atomic either, so that can be simplified along with some other comment
clarifications and simplifications.

Hopefully it's also a step towards to removing all of the duplicate
refcnt and mode tracking code from the individual devices. That tracking
pretty much always results in a one-shot enable/disable and fixes the
mode to either sysfs or Perf, and there is no reason that can't exist in
the core layer outside of the devices. I tried to finish that in this
set, but there turned out to be some complexities, so I cut it short at
a point where I can be sure that there are no behavioral changes.

James Clark (8):
  coresight: Fix issue where a source device's helpers aren't disabled
  coresight: Make language around "activated" sinks consistent
  coresight: Remove ops callback checks
  coresight: Move mode to struct coresight_device
  coresight: Remove the 'enable' field.
  coresight: Move all sysfs code to sysfs file
  coresight: Remove atomic type from refcnt
  coresight: Remove unused stubs

 drivers/hwtracing/coresight/coresight-core.c  | 494 +-----------------
 drivers/hwtracing/coresight/coresight-etb10.c |  29 +-
 .../hwtracing/coresight/coresight-etm-perf.c  |   2 +-
 drivers/hwtracing/coresight/coresight-etm.h   |   2 -
 .../coresight/coresight-etm3x-core.c          |  17 +-
 .../coresight/coresight-etm3x-sysfs.c         |   4 +-
 .../coresight/coresight-etm4x-core.c          |   4 +-
 drivers/hwtracing/coresight/coresight-priv.h  |   9 +-
 drivers/hwtracing/coresight/coresight-stm.c   |  24 +-
 drivers/hwtracing/coresight/coresight-sysfs.c | 391 ++++++++++++++
 .../hwtracing/coresight/coresight-tmc-core.c  |   2 +-
 .../hwtracing/coresight/coresight-tmc-etf.c   |  46 +-
 .../hwtracing/coresight/coresight-tmc-etr.c   |  33 +-
 drivers/hwtracing/coresight/coresight-tmc.h   |   2 -
 drivers/hwtracing/coresight/coresight-tpda.c  |  13 +-
 drivers/hwtracing/coresight/coresight-tpiu.c  |  14 +-
 drivers/hwtracing/coresight/ultrasoc-smb.c    |  22 +-
 drivers/hwtracing/coresight/ultrasoc-smb.h    |   2 -
 include/linux/coresight.h                     | 114 +---
 19 files changed, 561 insertions(+), 663 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-01-24 11:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 15:53 [PATCH 0/8] coresight: Separate sysfs and Perf usage and some other cleanups James Clark
2023-12-12 15:53 ` [PATCH 1/8] coresight: Fix issue where a source device's helpers aren't disabled James Clark
2023-12-12 17:44   ` Suzuki K Poulose
2023-12-13 13:54     ` James Clark
2023-12-13 16:28       ` Suzuki K Poulose
2023-12-12 15:53 ` [PATCH 2/8] coresight: Make language around "activated" sinks consistent James Clark
2024-01-08 11:21   ` Suzuki K Poulose
2024-01-24 11:10     ` James Clark
2023-12-12 15:54 ` [PATCH 3/8] coresight: Remove ops callback checks James Clark
2023-12-12 15:54 ` [PATCH 4/8] coresight: Move mode to struct coresight_device James Clark
2024-01-08 11:32   ` Suzuki K Poulose
2023-12-12 15:54 ` [PATCH 5/8] coresight: Remove the 'enable' field James Clark
2024-01-08 14:42   ` Suzuki K Poulose
2024-01-19  9:59     ` James Clark
2024-01-19 10:07       ` Suzuki K Poulose
2023-12-12 15:54 ` [PATCH 6/8] coresight: Move all sysfs code to sysfs file James Clark
2024-01-09 10:22   ` Suzuki K Poulose
2023-12-12 15:54 ` [PATCH 7/8] coresight: Remove atomic type from refcnt James Clark
2023-12-12 15:54 ` [PATCH 8/8] coresight: Remove unused stubs James Clark
2024-01-09 10:38   ` Suzuki K Poulose
2024-01-09 16:48     ` James Clark
2024-01-10 14:00       ` Suzuki K Poulose

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