On 21/03/2025 11:02, Suzuki K Poulose wrote:
On 20/03/2025 14:34, James Clark wrote:
The self hosted claim tag will be reset on device probe in a later
commit. We'll want to do this before coresight_register() is called so
won't have a coresight_device and have to use cs_access instead.
Also make them public and create locked and unlocked versions for
later use.
These look functions look like they set the whole tags register as one
value, but they only set and clear the self hosted bit using a SET/CLR
bits mechanism so also rename the functions to reflect this better.
Reviewed-by: Leo Yan <leo.yan@xxxxxxx>
Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
---
drivers/hwtracing/coresight/coresight-core.c | 27 +++++++++++++++++ + +--------
include/linux/coresight.h | 3 ++-
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/ hwtracing/coresight/coresight-core.c
index fb43ef6a3b1f..8471aefeac76 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -144,19 +144,30 @@ static inline bool coresight_is_claimed_any(struct coresight_device *csdev)
return coresight_read_claim_tags(csdev) != 0;
}
-static inline void coresight_set_claim_tags(struct coresight_device *csdev)
+static inline void coresight_set_self_claim_tag(struct coresight_device *csdev)
nit: For consistency, this should be renamed to _unlocked ?
minor nit on the subject;
s/cs_access/csdev_access/
Suzuki
Rest looks fine to me