aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/power
diff options
context:
space:
mode:
authorPi-Cheng Chen <pi-cheng.chen@linaro.org>2015-12-28 21:06:17 +0800
committerAlex Shi <alex.shi@linaro.org>2016-04-01 13:24:16 +0800
commitb75705eb4ab6661651178cb35c07fae6bd156ab3 (patch)
treeca0f73b7612665956b5d51e05d5867b2e0ff50ab /drivers/base/power
parent743336f5d0d4e866c7ef467c9c4d3d9f0ba15c83 (diff)
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>
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/opp/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
index 7b445e88a0d5..9f0c15570f64 100644
--- a/drivers/base/power/opp/cpu.c
+++ b/drivers/base/power/opp/cpu.c
@@ -214,7 +214,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table);
/*
* Works only for OPP v2 bindings.
*
- * cpumask should be already set to mask of cpu_dev->id.
* Returns -ENOENT if operating-points-v2 bindings aren't supported.
*/
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
return -ENOENT;
}
+ cpumask_set_cpu(cpu_dev->id, cpumask);
+
/* OPPs are shared ? */
if (!of_property_read_bool(np, "opp-shared"))
goto put_cpu_node;