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:	Fri, 15 May 2015 16:54:59 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc:	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Kevin Hilman <khilman@...nel.org>,
	Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] PM / sleep: Let devices force direct_complete

On Friday, May 15, 2015 03:25:00 PM Tomeu Vizoso wrote:
> On 14 May 2015 at 21:56, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> > On Thursday, May 14, 2015 03:37:52 PM Tomeu Vizoso wrote:
> >> Introduce a new per-device flag power.force_direct_complete that will
> >> instruct the PM core to let that device remain in runtime suspend when
> >> the system goes into a sleep power state, regardless of the PM state of
> >> any of its descendants.
> >>
> >> This is needed because otherwise it would be needed to get dozens of
> >> drivers to implement the prepare() callback and be runtime PM active
> >> even if they don't have a 1-to-1 relationship with a piece of HW.
> >>
> >> This only applies to devices that aren't wakeup-capable, as those would
> >> need to setup their IRQs as wakeup-capable in their prepare() callbacks.
> >>
> >> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
> >
> > Well, my idea of a "direct complete" flag was a bit different and I have
> > a concern with this particular implementation. ->
> 
> Yeah, I started like that but then realized that, at least in the
> uvcvideo case, it doesn't know at probe() time how many descendants
> it's going to have.
> 
> This was discussed in:
> 
> http://article.gmane.org/gmane.linux.power-management.general/59157

I guess the solution may be to inherit the parent setting when creating
a device in those cases, so the ucvideo will set the flag for the top-most
device at probe() time and the devices below it will simply inherit the
setting.

This way or another, I would very much prefer to restrict this new thing
to device_prepare().


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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