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

Suzuki K Poulose suzuki.poulose at arm.com
Fri Sep 18 11:52:52 EDT 2020


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 at arm.com> wrote:
>>
>> Convert CS_LOCK/UNLOCK operations to use the device access layer.
>>
>> Cc: Mathieu Poirier <mathieu.poirier at linaro.org>
>> Cc: Mike Leach <mike.leach at linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose at 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 at linaro.org>

Thanks for the review

Suzuki



More information about the linux-arm-kernel mailing list