Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1386174
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 |
| Date | 2016-04-25 11:40 +0200 |
| Message-ID | <rrL9M-3t5-21@gated-at.bofh.it> (permalink) |
| References | <rqiCR-6mQ-5@gated-at.bofh.it> <rqiCR-6mQ-3@gated-at.bofh.it> <rqRKi-Ux-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 22-04-16, 15:27, Stephen Boyd wrote:
> On 04/21, Viresh Kumar wrote:
> > @@ -167,14 +167,16 @@ static int cpufreq_init(struct cpufreq_policy *policy)
> > /* Get OPP-sharing information from "operating-points-v2" bindings */
> > ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus);
> > if (ret) {
> > + if (ret != -ENOENT)
> > + goto out_put_clk;
> > +
> > /*
> > * operating-points-v2 not supported, fallback to old method of
> > - * finding shared-OPPs for backward compatibility.
> > + * finding shared-OPPs for backward compatibility if the
> > + * platform hasn't set sharing CPUs.
> > */
> > - if (ret == -ENOENT)
> > - opp_v1 = true;
> > - else
> > - goto out_put_clk;
> > + if (dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus))
> > + fallback = true;
>
> I'm sort of lost, we make the same call twice here. Why would the
> return value change between the first time and the second?
Two different APIs, which look similar :)
The first one tries to find the sharing-cpus relation from DT, the
other one is for v1 bindings and finds it due to platform code
dev_pm_opp_set_sharing_cpus() call.
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-21 11:00 +0200
Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Stephen Boyd <sboyd@codeaurora.org> - 2016-04-23 00:30 +0200
Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-25 11:40 +0200
Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 "Rafael J. Wysocki" <rafael@kernel.org> - 2016-04-25 23:50 +0200
Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Stephen Boyd <sboyd@codeaurora.org> - 2016-04-26 00:00 +0200
Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-04-26 00:10 +0200
Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Stephen Boyd <sboyd@codeaurora.org> - 2016-04-25 23:50 +0200
csiph-web