Thread (54 messages) 54 messages, 2 authors, 2020-09-30

Re: [PATCH 05/19] coresight: Use device access layer for Software lock/unlock operations

From: Suzuki K Poulose <suzuki.poulose@arm.com>
Date: 2020-09-18 15:49:45

On 09/18/2020 04:34 PM, Mike Leach wrote:
Hi Suzuki,

On Fri, 11 Sep 2020 at 09:41, Suzuki K Poulose [off-list ref] wrote:
quoted
Convert CS_LOCK/UNLOCK operations to use the device access layer.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <redacted>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
quoted
diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c
index 96544b348c27..5d5619284866 100644
--- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
+++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
@@ -108,6 +108,20 @@ static bool debug_enable;
  module_param_named(enable, debug_enable, bool, 0600);
  MODULE_PARM_DESC(enable, "Control to enable coresight CPU debug functionality");

+static inline void coresight_debug_lock(struct debug_drvdata *drvdata)
+{
+       struct csdev_access dummy = CSDEV_ACCESS_IOMEM(drvdata->base);
+
+       CS_LOCK(&dummy);
+}
+
+static void coresight_debug_unlock(struct debug_drvdata *drvdata)
+{
+       struct csdev_access dummy = CSDEV_ACCESS_IOMEM(drvdata->base);
+
+       CS_UNLOCK(&dummy);
+}
+
Perhaps it's just me, but whenever I see "dummy" in code, I
immediately think this is stubbed out and doing nothing.
No, you are not alone. I will change it to something sensible.
quoted
Reviewed by: Mike Leach [off-list ref]
Thanks for the review

Suzuki

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help