From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
Rafael Wysocki <rjw@rjwysocki.net>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Joonyoung Shim <jy0922.shim@samsung.com>
Subject: Re: [PATCH] PM / OPP: Allow inactive opp_device to be present in dev list
Date: Fri, 25 Nov 2016 16:28:51 +0900 [thread overview]
Message-ID: <5837E833.20007@samsung.com> (raw)
In-Reply-To: <2fe61813c867c173ddfcb0b9cabc00a65997a935.1480056714.git.viresh.kumar@linaro.org>
On 11/25/2016 03:53 PM, 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>
It's working well during system suspend/resume on my Odroid-XU3 board.
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
Thanks.
next prev parent reply other threads:[~2016-11-25 7:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161125065330epcas1p23c3bc3b47fde680f84d3b7c3252ad9ed@epcas1p2.samsung.com>
2016-11-25 6:53 ` [PATCH] PM / OPP: Allow inactive opp_device to be present in dev list Viresh Kumar
2016-11-25 6:55 ` Viresh Kumar
2016-11-25 15:55 ` Rafael J. Wysocki
2016-11-25 7:28 ` Joonyoung Shim [this message]
2016-11-29 2:46 ` Stephen Boyd
2016-11-29 3:55 ` Viresh Kumar
2016-11-29 5:11 ` Viresh Kumar
2016-11-29 20:56 ` Stephen Boyd
2016-11-30 1:36 ` Viresh Kumar
2016-11-30 5:33 ` Viresh Kumar
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=5837E833.20007@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=stable@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.org \
/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).