Skip to content

Commit cb8acf6

Browse files
Pi-Cheng ChenAlex Shi
authored andcommitted
PM / OPP: Set cpu_dev->id in cpumask first
Set cpu_dev->id in cpumask first when setting up cpumask for CPUs that share the same OPP table. This might be helpful when handling cpumask without the original CPU bitfield set. Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit d9de19b1cc013433ad293365b5b3902ec73dfd60) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent ff7d038 commit cb8acf6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/base/power/opp

drivers/base/power/opp/cpu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table);
214214
/*
215215
* Works only for OPP v2 bindings.
216216
*
217-
* cpumask should be already set to mask of cpu_dev->id.
218217
* Returns -ENOENT if operating-points-v2 bindings aren't supported.
219218
*/
220219
int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
@@ -230,6 +229,8 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask
230229
return -ENOENT;
231230
}
232231

232+
cpumask_set_cpu(cpu_dev->id, cpumask);
233+
233234
/* OPPs are shared ? */
234235
if (!of_property_read_bool(np, "opp-shared"))
235236
goto put_cpu_node;

0 commit comments

Comments
 (0)