Skip to content
  • Andrew Jones's avatar
    arm/arm64: smp: introduce on_cpu and on_cpu_async · e713fd55
    Andrew Jones authored
    
    
    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: default avatarAndrew Jones <drjones@redhat.com>
    Message-Id: <20170601135002.26704-3-drjones@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    e713fd55