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:	Mon, 5 Oct 2015 14:21:34 +0200
From:	Tomeu Vizoso <tomeu.vizoso@...labora.com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Ulf Hansson <ulf.hansson@...aro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	martyn.welch@...labora.co.uk,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Len Brown <len.brown@...el.com>,
	Kevin Hilman <khilman@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Pavel Machek <pavel@....cz>
Subject: Re: [PATCH v8 3/4] PM / sleep: Go direct_complete if driver has no callbacks

On 2 October 2015 at 15:42, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> On Friday, October 02, 2015 10:40:49 AM Ulf Hansson wrote:
>> On 2 October 2015 at 10:10, Tomeu Vizoso <tomeu.vizoso@...labora.com> wrote:
>> > On 2 October 2015 at 09:48, Ulf Hansson <ulf.hansson@...aro.org> wrote:
>> >> On 2 October 2015 at 09:14, Tomeu Vizoso <tomeu.vizoso@...labora.com> wrote:
>> >>> If a suitable prepare callback cannot be found for a given device and
>> >>> its driver has no PM callbacks at all, assume that it can go direct to
>> >>> complete when the system goes to sleep.
>> >>>
>> >>> The reason for this is that there's lots of devices in a system that do
>> >>> no PM at all and there's no reason for them to prevent their ancestors
>> >>> to do direct_complete if they can support it.
>> >>>
>> >>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
>> >>> ---
>> >>>
>> >>> Changes in v8:
>> >>> - Move no_pm_callbacks field into CONFIG_PM_SLEEP
>> >>> - Call device_check_pm_callbacks only after a device is bound or unbound
>> >>
>> >> Devices that don't use a driver, will not get this feature for "free".
>> >> I expect in those cases, they will have to call
>> >> device_check_pm_callbacks() themselves, right?
>> >
>> > You are right, but wonder if we shouldn't go back to calling
>> > device_check_pm_callbacks() from device_pm_add() and
>> > dev_pm_domain_set() so they don't have to.
>>
>> That seems reasonable to me, and I didn't quite understand why you
>> decided to remove it. :-)
>
> Right.
>
> device_check_pm_callbacks() needs to be called on device registration too
> (in case the device doesn't have a driver and doesn't use a PM domain) and
> it won't hurt to call it in dev_pm_domain_set() either, although that likely
> will be redundant in the majority of cases.

I got it. I misunderstood your comment from the other day.

Thanks,

Tomeu

> Thanks,
> Rafael
>
> --
> 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/
--
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