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]
Date:	Tue, 06 Aug 2013 22:31:19 +0000
From:	Shuah Khan <shuah.kh@...sung.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	"pavel@....cz" <pavel@....cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Shuah Khan <shuah.kh@...sung.com>
Subject: Re: sl811h_suspend() and PM_EVENT_PRETHAW state handling

On 08/06/2013 04:28 PM, Rafael J. Wysocki wrote:
> On Tuesday, August 06, 2013 09:38:36 PM Shuah Khan wrote:
>> On 08/06/2013 03:22 PM, Alan Stern wrote:
>>> On Tue, 6 Aug 2013, Shuah Khan wrote:
>>>
>>>> With the dev_pm_ops model, drivers have to provide interfaces for each
>>>> one of these states.
>>>
>>> No, they don't.  They can leave out interfaces if they want.
>>
>> Yes. Agreed. There is no need to provide each and every interface. Only
>> the ones driver wishes to handle.
>>
>>>
>>>>    In this case, there will be a conflict since
>>>> pm_op() treats this state as freeze where as the driver wants to do
>>>> treat it as a suspend/hibernate. In the case of legacy pm_ops, state is
>>>> passed in as a parameter and driver could take special action if need
>>>> be, based on the state, however in dev_pm_ops model, state is not passed
>>>> in. Instead it is handled with state specific pm_ops interfaces.
>>>>
>>>> For example, if this driver were to be converted to dev_pm_ops, it would
>>>> require a freeze interface which will call sl811h_bus_suspend(). Once
>>>> that is done, PM_EVENT_PRETHAW will be mapped to freeze() ops and
>>>> sl811h_bus_suspend() will be called instead of port_power(sl811, 0);
>>>>
>>>> What I am getting at is, there is no provision to handle the special
>>>> case for PM_EVENT_PRETHAW like in the case of this driver when using
>>>> dev_pm_ops.
>>>
>>> Okay.  So what?
>>>
>>
>> I am exploring to see if there is a deficiency in dev_pm_ops
>> infrastructure that needs addressing.
>
> No, there isn't.  We determined a few years ago that "freeze" could always be
> used instead of "prethaw".  Moreover, there actually is a "thaw" after that
> stage if the image restoration fails, so please just use "freeze" here.  Or
> just skip it if it is not really needed.
>

Thanks Rafael!

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@...sung.com | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ