lkml.org 
[lkml]   [2016]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] PM / sleep: don't suspend parent when async child suspend_{noirq,late} fails
On Thu, Nov 10, 2016 at 3:00 AM, Brian Norris <briannorris@chromium.org> wrote:
> On Thu, Nov 10, 2016 at 02:53:20AM +0100, Rafael J. Wysocki wrote:
>> On Thu, Nov 10, 2016 at 2:21 AM, Brian Norris <briannorris@chromium.org> wrote:
>> > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
>> > index c58563581345..57a8ca4bc8ab 100644
>> > --- a/drivers/base/power/main.c
>> > +++ b/drivers/base/power/main.c
>> > @@ -1027,6 +1027,8 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a
>> > TRACE_DEVICE(dev);
>> > TRACE_SUSPEND(0);
>> >
>> > + dpm_wait_for_children(dev, async);
>> > +
>>
>> On a second thought. I'd move the
>>
>> if (dev->power.syscore || dev->power.direct_complete)
>>
>> along with this (and put it in front), because those flags won't
>> change while children are being waited on anyway.
>
> I can do that, but is it really necessary? It's also not the order we do
> it for __device_suspend(). I don't like arbitrarily making optimizations
> in this code differently to the non-{noirq,late} versions.

Good point.

Applied, thanks!

Rafael

\
 
 \ /
  Last update: 2016-11-11 02:43    [W:0.091 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site