Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532259
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3] PM / OPP: Don't remove the first cpu in the mask before removing others |
| Date | 2016-11-29 14:00 +0100 |
| Message-ID | <sIQaS-9a-19@gated-at.bofh.it> (permalink) |
| References | <sIJsK-49m-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 29, 2016 at 6:42 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > Joonyoung Shim reported an interesting problem on his ARM octa-core > Odoroid-XU3 platform. During system suspend, dev_pm_opp_put_regulator() > was failing for a struct device for which dev_pm_opp_set_regulator() is > called earlier. > > This happened because an earlier call to > dev_pm_opp_of_cpumask_remove_table() function (from cpufreq-dt.c file) > removed all the entries from opp_table->dev_list apart from the last CPU > device in the cpumask of CPUs sharing the OPP. > > But both dev_pm_opp_set_regulator() and dev_pm_opp_put_regulator() > routines get CPU device for the first CPU in the cpumask. And so the OPP > core failed to find the OPP table for the struct device. > > In order to fix that up properly, we need to revisit APIs like > dev_pm_opp_set_regulator() and make them talk in terms of cookies > provided by the OPP core. But such a solution will be hard to backport > to stable kernels. > > This patch attempts to fix this problem (in a Hacky way) by specially > handling the first cpu in the mask. A FIXME is also added to make sure > that this Hack doesn't get unnoticed later on. > > Cc: # v4.4+ <stable@vger.kernel.org> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > --- > V2->V3: > - Fix $Subject, which carried text from V1. > > V1->V2: > - A completely different approach, more of hack so that backport to > stable kernels can be done easily. > - A more comprehensive solution is required to fix the design flaws. I'll wait for a response from Stephen this time. Thanks, Rafael
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V3] PM / OPP: Don't remove the first cpu in the mask before removing others Viresh Kumar <viresh.kumar@linaro.org> - 2016-11-29 06:50 +0100 Re: [PATCH V3] PM / OPP: Don't remove the first cpu in the mask before removing others "Rafael J. Wysocki" <rafael@kernel.org> - 2016-11-29 14:00 +0100
csiph-web