Skip to content
  • Will Deacon's avatar
    ARM: 7405/1: kexec: call platform_cpu_kill on the killer rather than the victim · 6fa99b7f
    Will Deacon authored
    
    
    When performing a kexec on an SMP system, the secondary cores are stopped
    by calling machine_shutdown(), which in turn issues IPIs to offline the
    other CPUs. Unfortunately, this isn't enough to reboot the cores into
    a new kernel (since they are just executing a cpu_relax loop somewhere
    in memory) so we make use of platform_cpu_kill, part of the CPU hotplug
    implementation, to place the cores somewhere safe. This function expects
    to be called on the killing CPU for each core that it takes out.
    
    This patch moves the platform_cpu_kill callback out of the IPI handler
    and into smp_send_stop, therefore ensuring that it executes on the
    killing CPU rather than on the victim, matching what the hotplug code
    requires.
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    6fa99b7f