coresight: Separate sysfs and Perf usage and some other cleanups
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest12 patches 1 replyApplied
- v18 patches 13 repliesSuperseded
Changes in v2 from the cover letter
* Clarify further "the selected sink" in _coresight_build_path()
* Move etm4x's mode to coresight device which was missing from V1
* Use explicit initialisers in coresight_dev_type
* Create functions for handling mode changes
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | coresight: Fix issue where a source device's helpers aren't disableddrivers/ drivers/ drivers/ | +25 | 0 replies | |
| 2/12 | coresight: Make language around "activated" sinks consistentdrivers/ drivers/ include/ | +27 | 0 replies | |
| 3/12 | coresight: Remove ops callback checksdrivers/ | +12 | 0 replies | |
| 4/12 | coresight: Move mode to struct coresight_devicedrivers/ drivers/ drivers/ +11 more | +69 | 0 replies | |
| 5/12 | coresight: Remove the 'enable' field.drivers/ drivers/ include/ | +38 | 0 replies | |
| 6/12 | coresight: Move all sysfs code to sysfs filedrivers/ drivers/ drivers/ +4 more | +407 | 0 replies | |
| 7/12 | coresight: Remove atomic type from refcntdrivers/ drivers/ drivers/ +5 more | +59 | 0 replies | |
| 8/12 | coresight: Remove unused stubsinclude/ | +0 | 0 replies | |
| 9/12 | coresight: Add explicit member initializers to coresight_dev_typedrivers/ | +5 | 0 replies | |
| 10/12 | coresight: Add helper for atomically taking the devicedrivers/ drivers/ drivers/ +1 more | +20 | 0 replies | |
| 11/12 | coresight: Add a helper for getting csdev->modedrivers/ drivers/ drivers/ +8 more | +50 | 0 replies | |
| 12/12 | coresight: Add helper for setting csdev->modedrivers/ drivers/ drivers/ +5 more | +35 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/12] coresight: Separate sysfs and Perf usage and some other cleanups
Changes since V1:
* Clarify further "the selected sink" in _coresight_build_path()
* Move etm4x's mode to coresight device which was missing from V1
* Use explicit initialisers in coresight_dev_type
* Create functions for handling mode changes
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 (12):
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
coresight: Add explicit member initializers to coresight_dev_type
coresight: Add helper for atomically taking the device
coresight: Add a helper for getting csdev->mode
coresight: Add helper for setting csdev->mode
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 | 23 +- .../coresight/coresight-etm3x-sysfs.c | 4 +- .../coresight/coresight-etm4x-core.c | 26 +- drivers/hwtracing/coresight/coresight-etm4x.h | 1 - drivers/hwtracing/coresight/coresight-priv.h | 9 +- drivers/hwtracing/coresight/coresight-stm.c | 30 +- 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 | 146 ++---- 20 files changed, 606 insertions(+), 685 deletions(-)
Signature · 1 line
2.34.1