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

arm/arm64: smp: introduce on_cpu and on_cpu_async



x86 has two smp functions on_cpu() and on_cpu_async(). These are
nice because we can run them more than once on cpus. This patch
adds the same API to ARM, but the target cpu requirements are
not the same. While on x86 the interrupt controller must be
enabled enough to send/receive IPIs and the target cpu must have
interrupts enabled (or be expected to enable them), on ARM we do
not use IPIs, so the GIC does not need to be enabled and cpus do
not need to register irq handlers nor enable interrupts. Instead,
target cpus are expected to be powered off or idle. The advantage
of the ARM approach is the lack of interrupt handling dependencies.
The disadvantage is the lack of preemption - even on_cpu_async()
must wait for the target cpu to be idle first.

Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Message-Id: <20170601135002.26704-3-drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 9246de4c
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