Skip to content
Commit 543ce33c authored by Andrew Jones's avatar Andrew Jones Committed by Paolo Bonzini
Browse files

lib/arm/smp: introduce smp_run



A common pattern is
 - run a function on all cpus
 - signal each cpu's completion with a cpumask
 - halt the secondaries when they're complete
 - have the primary wait on the cpumask for all to complete

smp_run is a wrapper for that pattern. Also, we were allowing
secondaries to go off in the weeds if they returned from their
secondary entry function, which can be difficult to debug. A
nice side-effect of adding this wrapper is we don't do that
anymore, and can even know when a secondary has halted with the
new cpu_halted_mask.

Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Message-Id: <20170525102849.22754-4-drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c535b2f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment