From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/7] cpufreq: mvebu: Use dev_pm_opp_remove()
Date: Tue, 12 Dec 2017 13:03:20 +0530 [thread overview]
Message-ID: <20171212073320.GN25177@vireshk-i7> (raw)
In-Reply-To: <20171212082846.4e201953@windsurf.png.is.keysight.com>
On 12-12-17, 08:28, Thomas Petazzoni wrote:
> Hello,
>
> On Thu, 7 Dec 2017 14:56:13 +0100, Gregory CLEMENT wrote:
>
> > - /*
> > - * In case of a failure of dev_pm_opp_add(), we don't
> > - * bother with cleaning up the registered OPP (there's
> > - * no function to do so), and simply cancel the
> > - * registration of the cpufreq device.
> > - */
> > ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk), 0);
> > if (ret) {
> > clk_put(clk);
> > @@ -90,6 +84,11 @@ static int __init armada_xp_pmsu_cpufreq_init(void)
> >
> > ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk) / 2, 0);
> > if (ret) {
> > + /*
> > + * The second opp failed to be added, remove
> > + * the first one before exiting.
> > + */
> > + dev_pm_opp_remove(cpu_dev, clk_get_rate(clk));
> > clk_put(clk);
> > return ret;
> > }
>
> This still doesn't fix the failure situation. Indeed, you are only
> removing the OPP at full rate for the current CPU, but you are not
> removing the OPPs for the N-1 previous CPUs that have been handled in
> previous iterations of the loop.
Sorry for missing that, I quickly looked at source and missed seeing the
for_each_cpu loop :(
--
viresh
next prev parent reply other threads:[~2017-12-12 7:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 13:56 [PATCH v2 0/7] Add CPU Frequency scaling support on Armada 37xx Gregory CLEMENT
2017-12-07 13:56 ` [PATCH v2 1/7] dt-bindings: marvell: Add documentation for the North Bridge PM " Gregory CLEMENT
2017-12-07 23:36 ` Rob Herring
2017-12-07 13:56 ` [PATCH v2 2/7] cpufreq: ARM: sort the Kconfig menu Gregory CLEMENT
2017-12-12 6:56 ` Viresh Kumar
2017-12-07 13:56 ` [PATCH v2 3/7] cpufreq: sort the drivers in ARM part Gregory CLEMENT
2017-12-12 6:57 ` Viresh Kumar
2017-12-07 13:56 ` [PATCH v2 4/7] cpufreq: mvebu: Use dev_pm_opp_remove() Gregory CLEMENT
2017-12-12 7:21 ` Viresh Kumar
2017-12-12 7:28 ` Thomas Petazzoni
2017-12-12 7:33 ` Viresh Kumar [this message]
2017-12-07 13:56 ` [PATCH v2 5/7] MAINTAINERS: add new entries for Armada 37xx cpufreq driver Gregory CLEMENT
2017-12-12 7:22 ` Viresh Kumar
2017-12-07 13:56 ` [PATCH v2 6/7] cpufreq: Add DVFS support for Armada 37xx Gregory CLEMENT
2017-12-12 7:24 ` Viresh Kumar
2017-12-13 16:45 ` Gregory CLEMENT
2017-12-07 13:56 ` [PATCH v2 7/7] arm64: dts: marvell: armada-37xx: add nodes allowing cpufreq support Gregory CLEMENT
2017-12-07 17:14 ` [PATCH v2 0/7] Add CPU Frequency scaling support on Armada 37xx Rafael J. Wysocki
2017-12-07 17:58 ` Gregory CLEMENT
2017-12-07 21:19 ` Rafael J. Wysocki
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=20171212073320.GN25177@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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