On 09/18/2020 04:34 PM, Mike Leach wrote:
Hi Suzuki,
On Fri, 11 Sep 2020 at 09:41, Suzuki K Poulose suzuki.poulose@arm.com wrote:
Convert CS_LOCK/UNLOCK operations to use the device access layer.
Cc: Mathieu Poirier mathieu.poirier@linaro.org Cc: Mike Leach mike.leach@linaro.org Signed-off-by: Suzuki K Poulose suzuki.poulose@arm.com
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.
Reviewed by: Mike Leach mike.leach@linaro.org
Thanks for the review
Suzuki