diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /drivers/base/power/opp/cpu.c | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/power/opp/cpu.c')
-rw-r--r-- | drivers/base/power/opp/cpu.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c index 83d6e7ba1a34..8c3434bdb26d 100644 --- a/drivers/base/power/opp/cpu.c +++ b/drivers/base/power/opp/cpu.c | |||
@@ -211,7 +211,7 @@ int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, | |||
211 | } | 211 | } |
212 | 212 | ||
213 | /* Mark opp-table as multiple CPUs are sharing it now */ | 213 | /* Mark opp-table as multiple CPUs are sharing it now */ |
214 | opp_table->shared_opp = true; | 214 | opp_table->shared_opp = OPP_TABLE_ACCESS_SHARED; |
215 | } | 215 | } |
216 | unlock: | 216 | unlock: |
217 | mutex_unlock(&opp_table_lock); | 217 | mutex_unlock(&opp_table_lock); |
@@ -227,7 +227,8 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus); | |||
227 | * | 227 | * |
228 | * This updates the @cpumask with CPUs that are sharing OPPs with @cpu_dev. | 228 | * This updates the @cpumask with CPUs that are sharing OPPs with @cpu_dev. |
229 | * | 229 | * |
230 | * Returns -ENODEV if OPP table isn't already present. | 230 | * Returns -ENODEV if OPP table isn't already present and -EINVAL if the OPP |
231 | * table's status is access-unknown. | ||
231 | * | 232 | * |
232 | * Locking: The internal opp_table and opp structures are RCU protected. | 233 | * Locking: The internal opp_table and opp structures are RCU protected. |
233 | * Hence this function internally uses RCU updater strategy with mutex locks | 234 | * Hence this function internally uses RCU updater strategy with mutex locks |
@@ -249,9 +250,14 @@ int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask) | |||
249 | goto unlock; | 250 | goto unlock; |
250 | } | 251 | } |
251 | 252 | ||
253 | if (opp_table->shared_opp == OPP_TABLE_ACCESS_UNKNOWN) { | ||
254 | ret = -EINVAL; | ||
255 | goto unlock; | ||
256 | } | ||
257 | |||
252 | cpumask_clear(cpumask); | 258 | cpumask_clear(cpumask); |
253 | 259 | ||
254 | if (opp_table->shared_opp) { | 260 | if (opp_table->shared_opp == OPP_TABLE_ACCESS_SHARED) { |
255 | list_for_each_entry(opp_dev, &opp_table->dev_list, node) | 261 | list_for_each_entry(opp_dev, &opp_table->dev_list, node) |
256 | cpumask_set_cpu(opp_dev->dev->id, cpumask); | 262 | cpumask_set_cpu(opp_dev->dev->id, cpumask); |
257 | } else { | 263 | } else { |