diff options
author | Zhang Zhuoyu <Zhuoyu.Zhang@freescale.com> | 2014-11-11 04:51:11 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:40:53 (GMT) |
commit | 289f1455531d45699ceac178680cc9db6a8c612e (patch) | |
tree | 403d71794d39c1f9e5b406b526982cf2fd3cfc98 /arch/arm/mach-imx/hotplug.c | |
parent | 630b7395a366ace88585d7c1e669bd434fcac1a6 (diff) | |
download | linux-fsl-qoriq-289f1455531d45699ceac178680cc9db6a8c612e.tar.xz |
arm: ls1: implement ls1 cpu-hotplug by reset core
CPU hotplug should always reset core and boots up the same path
as a cold boot to be compatible with kexec.
Signed-off-by: Zhang Zhuoyu <Zhuoyu.Zhang@freescale.com>
----
Fix previous known issue
http://git.am.freescale.net:8181/21918
Patch Sent Upstream
http://patchwork.ozlabs.org/patch/393683/
Change-Id: I668b59b4250ef62395a6fd8c22ea64f64af9d106
Reviewed-on: http://git.am.freescale.net:8181/23519
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Yuantian Tang <yuantian.tang@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/hotplug.c')
-rw-r--r-- | arch/arm/mach-imx/hotplug.c | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index bbbb96e..8b042c9 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c @@ -14,9 +14,7 @@ #include <linux/jiffies.h> #include <asm/cp15.h> #include <asm/proc-fns.h> -#include<asm/smp.h> -#include<asm/smp_plat.h> -#include<asm/cacheflush.h> +#include <asm/cacheflush.h> #include "common.h" @@ -41,22 +39,6 @@ static inline void cpu_enter_lowpower(void) : "cc"); } -static inline void cpu_leave_lowpower(void) -{ - unsigned int v; - - asm volatile( - " mrc p15, 0, %0, c1, c0, 0\n" - " orr %0, %0, %1\n" - " mcr p15, 0, %0, c1, c0, 0\n" - " mrc p15, 0, %0, c1, c0, 1\n" - " orr %0, %0, %2\n" - " mcr p15, 0, %0, c1, c0, 1\n" - : "=&r" (v) - : "Ir" (CR_C), "Ir" (0x40) - : "cc"); -} - /* * platform-specific code to shutdown a CPU * @@ -94,24 +76,10 @@ void __ref ls1021a_cpu_die(unsigned int cpu) { v7_exit_coherency_flush(louis); - /*we are ready to enter lower-power state*/ - wfi(); - /* - * bring this CPU back into the world of cache - * coherency, and then restore interrupts + /* LS1021a platform can't really power down a CPU, so we + * just put it into WFI state here. */ - cpu_leave_lowpower(); - - /* - * Do not return to the idle loop - jump back to the secondary - * cpu initialisation. There's some initialisation which needs - * to be repeated to undo the effects of taking the CPU offline. - */ - __asm__("mov sp, %0\n" - " mov fp, #0\n" - " b secondary_startup" - : - : "r" (task_stack_page(current) + THREAD_SIZE - 8)); + wfi(); } int ls1021a_cpu_kill(unsigned int cpu) |