ARM: mach-shmobile: Fix headsmp.S code to use CPUINIT
Quoted 9 lines · Magnus Damm
Convert the low level SMP assembly code for SH-Mobile ARM from using the INIT to the CPUINIT section. This unbreaks onlining of CPUs using the CPU hotplug interface:
echo 1 >
/sys/devices/system/cpu/cpu1/onlineWithout this fix the reset vector code used by CPU hotplug will be freed as init section data and CPU cores cannot be brought online.
Quoted 2 lines · Magnus Damm
Add the function
shmobile_platform_kill_cpu()to allow SoC specific code to tie in their CPU shutdown code.
Quoted 8 lines · Magnus Damm
Add cache flushing code to the SH-Mobile specific CPU hotplug implementation. While at it, add a cpu mask to make sure the cache flushing code is finished in
platform_cpu_die()before letting the SoC-specific code inshmobile_platform_cpu_kill()proceed with turning off power.Without this code CPU hotplug offline fails when cache is enabled on Cortex-A9 based SoCs.
All applied, thanks.