[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180522093803.kfmfktdskumxyqbx@vireshk-i7>
Date: Tue, 22 May 2018 15:08:03 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: ilialin@...eaurora.org
Cc: 'Sudeep Holla' <sudeep.holla@....com>, mturquette@...libre.com,
sboyd@...nel.org, robh@...nel.org, mark.rutland@....com, nm@...com,
lgirdwood@...il.com, broonie@...nel.org, andy.gross@...aro.org,
david.brown@...aro.org, catalin.marinas@....com,
will.deacon@....com, rjw@...ysocki.net, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-soc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
rnayak@...eaurora.org, amit.kucheria@...aro.org,
nicolas.dechesne@...aro.org, celster@...eaurora.org,
tfinkel@...eaurora.org
Subject: Re: [PATCH] cpufreq: Add Kryo CPU scaling driver
On 22-05-18, 10:59, ilialin@...eaurora.org wrote:
> OK, I think I found out the way. Would this be correct?
> -----------------------------------------------------------------------------------------------
> extern struct cpu_topology cpu_topology[NR_CPUS];
>
> static struct device *qcom_cpufreq_kryo_get_cluster_lead(int cluster)
> {
> unsigned cpu;
>
> for_each_possible_cpu(cpu) {
> if ((cluster == cpu_topology[cpu].cluster_id) &&
> (0 == cpu_topology[cpu].core_id))
> return get_cpu_device(cpu);
> }
>
> return NULL;
> }
Okay, this is what you should do IMHO.
for_each_possible_cpu(cpu) {
cpu_dev = xxx..
ret = dev_pm_opp_set_supported_hw(cpu_dev, xxx, xxx);
if (ret && ret != -EBUSY)
error-out.
}
This would require a trivial patch for the OPP core to not throw an
error message with -EBUSY. I can do that separately.
--
viresh
Powered by blists - more mailing lists