Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432382
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable |
| Date | 2016-06-28 03:30 +0200 |
| Message-ID | <rOQ0K-8jr-5@gated-at.bofh.it> (permalink) |
| References | <rNYCZ-7HJ-7@gated-at.bofh.it> <rOtdL-1Q6-7@gated-at.bofh.it> <rOz9v-5zv-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Monday, June 27, 2016 12:50:27 PM Viresh Kumar wrote:
> On 27-06-16, 03:12, Rafael J. Wysocki wrote:
> > ---
> > drivers/cpufreq/cpufreq.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > Index: linux-pm/drivers/cpufreq/cpufreq.c
> > ===================================================================
> > --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> > +++ linux-pm/drivers/cpufreq/cpufreq.c
> > @@ -1544,9 +1544,6 @@ static unsigned int cpufreq_update_curre
> > {
> > unsigned int new_freq;
> >
> > - if (cpufreq_suspended)
> > - return 0;
> > -
> > new_freq = cpufreq_driver->get(policy->cpu);
> > if (!new_freq)
> > return 0;
> > @@ -2280,6 +2277,10 @@ int cpufreq_update_policy(unsigned int c
> > * -> ask driver for current freq and notify governors about a change
> > */
> > if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
> > + if (cpufreq_suspended) {
> > + ret = -EAGAIN;
> > + goto unlock;
> > + }
> > new_policy.cur = cpufreq_update_current_freq(policy);
> > if (WARN_ON(!new_policy.cur)) {
> > ret = -EIO;
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Thanks, but this needs to go in in two pieces, because cpufreq_start_governor()
in the mainline doesn't check cpufreq_suspended (the linux-next version of it
does that).
So the second part of the patch is needed in the mainline/stable to get rid
of false-positive WARN_ON()s and the first one can go in on top of the
previous linux-next changes.
Thanks,
Rafael
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable Chen Yu <yu.c.chen@intel.com> - 2016-06-25 18:30 +0200
Re: [PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-27 03:10 +0200
Re: [PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-27 09:30 +0200
Re: [PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-28 03:30 +0200
csiph-web