summaryrefslogtreecommitdiff
path: root/include/linux/coresight.h
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2024-01-29 15:40:42 +0000
committerSuzuki K Poulose <suzuki.poulose@arm.com>2024-02-12 10:21:38 +0000
commitc95c2733e5feb1f6848923f166849b2d1c7bf682 (patch)
treeb6776719379e9cec14f2e904f00f31051cb136b6 /include/linux/coresight.h
parentd724f65218b994da234081df5dfe417c23802a65 (diff)
coresight: Add a helper for getting csdev->mode
Now that mode is in struct coresight_device accesses can be wrapped. Signed-off-by: James Clark <james.clark@arm.com> Link: https://lore.kernel.org/r/20240129154050.569566-12-james.clark@arm.com Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Diffstat (limited to 'include/linux/coresight.h')
-rw-r--r--include/linux/coresight.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index 414bcbbdaf62..a49e4e20e899 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -591,6 +591,11 @@ static inline bool coresight_take_mode(struct coresight_device *csdev,
CS_MODE_DISABLED;
}
+static inline enum cs_mode coresight_get_mode(struct coresight_device *csdev)
+{
+ return local_read(&csdev->mode);
+}
+
extern struct coresight_device *
coresight_register(struct coresight_desc *desc);
extern void coresight_unregister(struct coresight_device *csdev);