Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1529838 > unrolled thread
| Started by | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| First post | 2016-11-25 08:00 +0100 |
| Last post | 2016-11-25 17:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] PM / OPP: Allow inactive opp_device to be present in dev list Viresh Kumar <viresh.kumar@linaro.org> - 2016-11-25 08:00 +0100
Re: [PATCH] PM / OPP: Allow inactive opp_device to be present in dev list "Rafael J. Wysocki" <rafael@kernel.org> - 2016-11-25 17:00 +0100
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-11-25 08:00 +0100 |
| Subject | Re: [PATCH] PM / OPP: Allow inactive opp_device to be present in dev list |
| Message-ID | <sHiEh-5Bf-1@gated-at.bofh.it> |
On 25-11-16, 12:23, Viresh Kumar 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. > > This patch attempts to fix this problem by adding another field in the > struct opp_device: inactive. > > Instead of removing the entries from the list during > dev_pm_opp_of_cpumask_remove_table() function call, we mark them as > inactive. Such inactive devices will not be used by the core in most of > the cases, like before, but will be used only at special places which > need to take inactive devices into account. > > All the devices are removed from the list together now and that happens > only when the opp_table gets destroyed. > > This patch is tested on Dual A15, Exynos5250 platform by compiling the > cpufreq-dt driver as a module. The module is inserted/removed multiple > times with combinations of CPU offline/online steps. > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> @Rafael: Can you please add following while applying the patch ? Cc: <stable@vger.kernel.org> # v4.4+ Somehow git send-email wasn't working properly for me as it was trying to cc stable@vger.kernel.org#v4.4+ and that was failing. I tried lots of options including suppress-cc but nothing worked :( -- viresh
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-11-25 17:00 +0100 |
| Subject | Re: [PATCH] PM / OPP: Allow inactive opp_device to be present in dev list |
| Message-ID | <sHr4R-2rt-11@gated-at.bofh.it> |
| In reply to | #1529838 |
On Fri, Nov 25, 2016 at 7:55 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > On 25-11-16, 12:23, Viresh Kumar 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. >> >> This patch attempts to fix this problem by adding another field in the >> struct opp_device: inactive. >> >> Instead of removing the entries from the list during >> dev_pm_opp_of_cpumask_remove_table() function call, we mark them as >> inactive. Such inactive devices will not be used by the core in most of >> the cases, like before, but will be used only at special places which >> need to take inactive devices into account. >> >> All the devices are removed from the list together now and that happens >> only when the opp_table gets destroyed. >> >> This patch is tested on Dual A15, Exynos5250 platform by compiling the >> cpufreq-dt driver as a module. The module is inserted/removed multiple >> times with combinations of CPU offline/online steps. >> >> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > > @Rafael: Can you please add following while applying the patch ? > > Cc: <stable@vger.kernel.org> # v4.4+ Yes, I can, but I need an ACK for this from Stephen too. Thanks, Rafael
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web