lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANLsYkxTh8TUmOT+-J0cu_cCSYVvXV0zXO_sVepfX8LYgMgEsw@mail.gmail.com>
Date:	Thu, 23 Jun 2016 11:10:31 -0600
From:	Mathieu Poirier <mathieu.poirier@...aro.org>
To:	Sudeep Holla <sudeep.holla@....com>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] coresight: add PM runtime calls to coresight_simple_func()

On 23 June 2016 at 10:37, Sudeep Holla <sudeep.holla@....com> wrote:
>
>
> On 17/06/16 18:41, Mathieu Poirier wrote:
>>
>> It is mandatory to enable a coresight block's power domain before
>> trying to access management registers.  Otherwise the transaction
>> simply stalls, leading to a system hang.
>>
>> Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
>> ---
>>   drivers/hwtracing/coresight/coresight-priv.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-priv.h
>> b/drivers/hwtracing/coresight/coresight-priv.h
>> index ad975c58080d..b047241e7496 100644
>> --- a/drivers/hwtracing/coresight/coresight-priv.h
>> +++ b/drivers/hwtracing/coresight/coresight-priv.h
>> @@ -16,6 +16,7 @@
>>   #include <linux/bitops.h>
>>   #include <linux/io.h>
>>   #include <linux/coresight.h>
>> +#include <linux/pm_runtime.h>
>>
>>   /*
>>    * Coresight management registers (0xf00-0xfcc)
>> @@ -42,8 +43,10 @@ static ssize_t name##_show(struct device *_dev,
>> \
>>                            struct device_attribute *attr, char *buf)    \
>>   {                                                                     \
>>         type *drvdata = dev_get_drvdata(_dev->parent);                  \
>> +       pm_runtime_get_sync(_dev->parent);                              \
>>         return scnprintf(buf, PAGE_SIZE, "0x%x\n",                      \
>>                          readl_relaxed(drvdata->base + offset));        \
>> +       pm_runtime_put_sync(_dev->parent);                              \
>
>
> This is wrong, I just noticed when I was playing around this.
> Perhaps you meant to do this before returning ? I wonder why compiler
> doesn't throw any error.

Yes of course - I'll respin.

>
> --
> Regards,
> Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ