X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=kernel%2Fcpu.c;h=82cf9dff4295eaa82305fe04a43cecb0c8a4c27e;hb=2c4fabec8790384b91473aa3d0d28d4407168ef9;hp=964b4efadf413e8397367a6071e536adbec0fa1e;hpb=e5aeced6bcec5a110e6dfcb78acc203dbe895b59;p=deliverable%2Flinux.git diff --git a/kernel/cpu.c b/kernel/cpu.c index 964b4efadf41..82cf9dff4295 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -382,14 +382,14 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) * will observe it. * * For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu() might - * not imply sync_sched(), so explicitly call both. + * not imply sync_sched(), so wait for both. * * Do sync before park smpboot threads to take care the rcu boost case. */ -#ifdef CONFIG_PREEMPT - synchronize_sched(); -#endif - synchronize_rcu(); + if (IS_ENABLED(CONFIG_PREEMPT)) + synchronize_rcu_mult(call_rcu, call_rcu_sched); + else + synchronize_rcu(); smpboot_park_threads(cpu); @@ -402,7 +402,7 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) /* * So now all preempt/rcu users must observe !cpu_active(). */ - err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu)); + err = stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu)); if (err) { /* CPU didn't die: tell everyone. Can't complain. */ cpu_notify_nofail(CPU_DOWN_FAILED | mod, hcpu);