From 62694cd51322262a9142e946915fc4783113ccff Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 9 Oct 2015 18:36:29 +0200 Subject: sched: Move cpu_active() tests from stop_two_cpus() into migrate_swap_stop() The cpu_active() tests are not fundamentally part of stop_two_cpus(), move then into the scheduler where they belong. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- kernel/stop_machine.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'kernel/stop_machine.c') diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index e5a09d2dc575..867bc20e1ef1 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -275,15 +275,6 @@ int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void * cpu_stop_init_done(&done, 2); set_state(&msdata, MULTI_STOP_PREPARE); - /* - * We do not want to migrate to inactive CPU. FIXME: move this - * into migrate_swap_stop() callback. - */ - if (!cpu_active(cpu1) || !cpu_active(cpu2)) { - preempt_enable(); - return -ENOENT; - } - if (cpu1 > cpu2) swap(cpu1, cpu2); if (cpu_stop_queue_two_works(cpu1, &work1, cpu2, &work2)) { -- cgit