summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/src.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-03-26 16:46:07 +0800
committerShawn Guo <shawn.guo@linaro.org>2013-03-26 20:25:45 +0800
commit2f3edfd7e27ad4206acbc2ae99c9df5f46353024 (patch)
tree91a1caefb205cb5fe9fc28de6cddd9490540c9b0 /arch/arm/mach-imx/src.c
parent287939a3690c8da6fd3310d7593ff0448cb9447c (diff)
downloadop-kernel-dev-2f3edfd7e27ad4206acbc2ae99c9df5f46353024.zip
op-kernel-dev-2f3edfd7e27ad4206acbc2ae99c9df5f46353024.tar.gz
ARM: imx: fix sync issue between imx_cpu_die and imx_cpu_kill
There is a sync issue with hotplug operation. It's possible that when imx_cpu_kill gets running on primary core, the imx_cpu_die execution on the core which is to be killed hasn't been finished yet. The problem will very likely be hit when running suspend without no_console_suspend setting on kernel cmdline. It uses cpu jumping argument register to sync imx_cpu_die and imx_cpu_kill. The register will be set in imx_cpu_die and imx_cpu_kill will wait for the register being cleared to actually kill the cpu. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/src.c')
-rw-r--r--arch/arm/mach-imx/src.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c
index e15f155..09a742f 100644
--- a/arch/arm/mach-imx/src.c
+++ b/arch/arm/mach-imx/src.c
@@ -43,6 +43,18 @@ void imx_set_cpu_jump(int cpu, void *jump_addr)
src_base + SRC_GPR1 + cpu * 8);
}
+u32 imx_get_cpu_arg(int cpu)
+{
+ cpu = cpu_logical_map(cpu);
+ return readl_relaxed(src_base + SRC_GPR1 + cpu * 8 + 4);
+}
+
+void imx_set_cpu_arg(int cpu, u32 arg)
+{
+ cpu = cpu_logical_map(cpu);
+ writel_relaxed(arg, src_base + SRC_GPR1 + cpu * 8 + 4);
+}
+
void imx_src_prepare_restart(void)
{
u32 val;
OpenPOWER on IntegriCloud