linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <len.brown@intel.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	 Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	 Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	 Valentin Schneider <vschneid@redhat.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Marek Vasut <marex@denx.de>,
	 Bird@google.com, Tim <Tim.Bird@sony.com>,
	kernel-team@android.com,  linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/5] PM: sleep: Fix runtime PM issue in dpm_resume()
Date: Fri, 14 Mar 2025 13:49:31 -0700	[thread overview]
Message-ID: <CAGETcx_bSOAYwvc=M4nTJF-OAb-nNCQ5bCfQcrHMhyLmv3rd3w@mail.gmail.com> (raw)
In-Reply-To: <Z9SV5UymVcuUkSE1@duo.ucw.cz>

On Fri, Mar 14, 2025 at 1:47 PM Pavel Machek <pavel@ucw.cz> wrote:
>
> Hi!
>
> > Some devices might have their is_suspended flag set to false. In these
> > cases, dpm_resume() should skip doing anything for those devices.
> > However, runtime PM enable and a few others steps are done before
> > checking for this flag. Fix it so that we do things in the right order.
> >
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > ---
> >  drivers/base/power/main.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > index 4a67e83300e1..86e51b9fefab 100644
> > --- a/drivers/base/power/main.c
> > +++ b/drivers/base/power/main.c
> > @@ -913,6 +913,9 @@ static void device_resume(struct device *dev, pm_message_t state, bool async)
> >       if (dev->power.syscore)
> >               goto Complete;
> >
> > +     if (!dev->power.is_suspended)
> > +             goto Unlock;
> > +
>
> This needs to be goto Complete, right?

Yeah, it's a bug even I pointed out in another email. But Rafael send
a new proper fixed up patch that I Reviewed-by.

-Saravana

>                                                                 Pavel
> --
> People of Russia, stop Putin before his war on Ukraine escalates.

  reply	other threads:[~2025-03-14 20:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 22:09 [PATCH v1 0/5] Optimize async device suspend/resume Saravana Kannan
2024-11-14 22:09 ` [PATCH v1 1/5] PM: sleep: Fix runtime PM issue in dpm_resume() Saravana Kannan
2024-11-16  7:43   ` Greg Kroah-Hartman
2024-11-16 21:06     ` Saravana Kannan
2024-12-04 12:53   ` Rafael J. Wysocki
2025-03-11 10:47     ` Rafael J. Wysocki
2025-03-13  1:49       ` Saravana Kannan
2025-03-13 10:58         ` Rafael J. Wysocki
2025-03-14 20:47   ` Pavel Machek
2025-03-14 20:49     ` Saravana Kannan [this message]
2024-11-14 22:09 ` [PATCH v1 2/5] PM: sleep: Remove unnecessary mutex lock when waiting on parent Saravana Kannan
2024-12-02 20:11   ` Rafael J. Wysocki
2024-12-02 20:16     ` Rafael J. Wysocki
2024-12-02 20:46       ` Saravana Kannan
2024-12-02 21:14         ` Rafael J. Wysocki
2024-12-02 23:27           ` Saravana Kannan
2024-12-04 12:21             ` Rafael J. Wysocki
2024-11-14 22:09 ` [PATCH v1 3/5] PM: sleep: Add helper functions to loop through superior/subordinate devs Saravana Kannan
2024-11-14 22:09 ` [PATCH v1 4/5] PM: sleep: Do breadth first suspend/resume for async suspend/resume Saravana Kannan
2025-03-11 11:25   ` Geert Uytterhoeven
2024-11-14 22:09 ` [PATCH v1 5/5] PM: sleep: Spread out async kworker threads during dpm_resume*() phases Saravana Kannan
2024-11-15  5:25   ` Saravana Kannan
2024-11-15  9:25     ` Geert Uytterhoeven
2024-11-15 15:30     ` Vincent Guittot
2024-11-15 16:12   ` Vincent Guittot
2024-11-15 18:33     ` Saravana Kannan
2024-11-17  0:34   ` kernel test robot
2024-11-17  1:17   ` kernel test robot
2024-11-17 13:34   ` kernel test robot
2024-11-18  9:52   ` Christian Loehle
2024-11-18 17:18     ` Saravana Kannan
2024-11-19  4:04 ` [PATCH v1 0/5] Optimize async device suspend/resume Saravana Kannan
2024-11-19  9:51   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGETcx_bSOAYwvc=M4nTJF-OAb-nNCQ5bCfQcrHMhyLmv3rd3w@mail.gmail.com' \
    --to=saravanak@google.com \
    --cc=Bird@google.com \
    --cc=Tim.Bird@sony.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).