linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] cpufreq: Make cpufreq_online() call driver->offline() on errors
Date: Wed, 23 Jun 2021 08:40:51 +0530	[thread overview]
Message-ID: <20210623031051.xsbcug5erbgvzjde@vireshk-i7> (raw)
In-Reply-To: <5490292.DvuYhMxLoT@kreacher>

On 22-06-21, 21:11, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Subject: [PATCH] cpufreq: Make cpufreq_online() call driver->offline() on errors
> 
> In the CPU removal path the ->offline() callback provided by the
> driver is always invoked before ->exit(), but in the cpufreq_online()
> error path it is not, so ->exit() is expected to somehow know the
> context in which it has been called and act accordingly.
> 
> That is less than straightforward, so make cpufreq_online() invoke
> the driver's ->offline() callback, if present, on errors before
> ->exit() too.
> 
> This only potentially affects intel_pstate.
> 
> Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of CPUs")
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> -> v2:
>    * Avoid calling ->offline() after a failing ->online().
>    * Add a comment regarding the expected state after calling ->init().
>    * Edit the changelog a bit.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

      reply	other threads:[~2021-06-23  3:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 17:26 [PATCH] cpufreq: Make cpufreq_online() call driver->offline() on errors Rafael J. Wysocki
2021-06-22  6:20 ` Viresh Kumar
2021-06-22 12:18   ` Rafael J. Wysocki
2021-06-22 19:11 ` [PATCH v2] " Rafael J. Wysocki
2021-06-23  3:10   ` Viresh Kumar [this message]

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=20210623031051.xsbcug5erbgvzjde@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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).