UPSTREAM: stop_machine: Fix stop_cpus_in_progress ordering
Make sure the entire for loop has stop_cpus_in_progress set. BUG=b:152605392 TEST=run power_VideoCall test (cherry picked from commit 99d84bf8c65a7) Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Aaron Lu <aaron.lwe@gmail.com> Cc: Valentin Schneider <valentin.schneider@arm.com> Cc: mingo@kernel.org Cc: Phil Auld <pauld@redhat.com> Cc: Julien Desfossez <jdesfossez@digitalocean.com> Cc: Nishanth Aravamudan <naravamudan@digitalocean.com> Link: https://lkml.kernel.org/r/0fd8fd4b99b9b9aa88d8b2dff897f7fd0d88f72c.1559129225.git.vpillai@digitalocean.com Signed-off-by: Joel Fernandes <joelaf@google.com> Change-Id: I17b678ba09f877699831702122057d2e0cc7fd43 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2186280 Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
parent
c2f6ec5e1e
commit
e8ab9a3cec
@ -375,6 +375,7 @@ static bool queue_stop_cpus_work(const struct cpumask *cpumask,
|
||||
*/
|
||||
preempt_disable();
|
||||
stop_cpus_in_progress = true;
|
||||
barrier();
|
||||
for_each_cpu(cpu, cpumask) {
|
||||
work = &per_cpu(cpu_stopper.stop_work, cpu);
|
||||
work->fn = fn;
|
||||
@ -383,6 +384,7 @@ static bool queue_stop_cpus_work(const struct cpumask *cpumask,
|
||||
if (cpu_stop_queue_work(cpu, work))
|
||||
queued = true;
|
||||
}
|
||||
barrier();
|
||||
stop_cpus_in_progress = false;
|
||||
preempt_enable();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user