summaryrefslogtreecommitdiff
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-11-27 19:40:22 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-27 19:40:21 -0800
commit9aa1df0cf5ffb58b52b55b4fe2ea6531f795e186 (patch)
treed611b81f4df9ad3818bc17116ffcb6e8bbe3edfe /kernel/sched/core.c
parentb459804296ba378c3ea1e5f150ca05da7175627b (diff)
parent704e5bfc258c6b8b464f92ffeed079d060dc86d2 (diff)
Merge "sched: Ensure proper synch between isolation, hotplug, and suspend"
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a5d101e8a5f2..f60117eb60fa 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5682,7 +5682,7 @@ int sched_isolate_cpu(int cpu)
if (trace_sched_isolate_enabled())
start_time = sched_clock();
- lock_device_hotplug();
+ cpu_maps_update_begin();
cpumask_andnot(&avail_cpus, cpu_online_mask, cpu_isolated_mask);
@@ -5731,7 +5731,7 @@ int sched_isolate_cpu(int cpu)
sched_update_group_capacities(cpu);
out:
- unlock_device_hotplug();
+ cpu_maps_update_done();
trace_sched_isolate(cpu, cpumask_bits(cpu_isolated_mask)[0],
start_time, 1);
return ret_code;
@@ -5752,8 +5752,6 @@ int sched_unisolate_cpu_unlocked(int cpu)
if (trace_sched_isolate_enabled())
start_time = sched_clock();
- lock_device_hotplug_assert();
-
if (!cpu_isolation_vote[cpu]) {
ret_code = -EINVAL;
goto out;
@@ -5792,9 +5790,9 @@ int sched_unisolate_cpu(int cpu)
{
int ret_code;
- lock_device_hotplug();
+ cpu_maps_update_begin();
ret_code = sched_unisolate_cpu_unlocked(cpu);
- unlock_device_hotplug();
+ cpu_maps_update_done();
return ret_code;
}