diff options
author | John Stultz <john.stultz@linaro.org> | 2013-04-08 10:45:54 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-04-08 10:45:54 -0700 |
commit | 698cb5d58f5498273e71d4797c8b3353535c8de6 (patch) | |
tree | 20f459c3e673a04c82ba2d529fc14efd28c1dcb5 /arch/arm/mach-imx/hotplug.c | |
parent | 97c64b5e2132e104a8c25026319b239fce7463f4 (diff) | |
parent | 31880c37c11e28cb81c70757e38392b42e695dc6 (diff) |
Merge remote-tracking branch 'linus/master' into linaro-android-3.9-experimentaltracking-linaro-android-3.9-llct-20130408.0
Update to 3.9-rc6
Conflicts:
arch/arm/mm/cache-l2x0.c
drivers/hid/hid-magicmouse.c
Diffstat (limited to 'arch/arm/mach-imx/hotplug.c')
-rw-r--r-- | arch/arm/mach-imx/hotplug.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 7bc5fe15dda2..361a253e2b63 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c @@ -46,11 +46,23 @@ static inline void cpu_enter_lowpower(void) void imx_cpu_die(unsigned int cpu) { cpu_enter_lowpower(); + /* + * We use the cpu jumping argument register to sync with + * imx_cpu_kill() which is running on cpu0 and waiting for + * the register being cleared to kill the cpu. + */ + imx_set_cpu_arg(cpu, ~0); cpu_do_idle(); } int imx_cpu_kill(unsigned int cpu) { + unsigned long timeout = jiffies + msecs_to_jiffies(50); + + while (imx_get_cpu_arg(cpu) == 0) + if (time_after(jiffies, timeout)) + return 0; imx_enable_cpu(cpu, false); + imx_set_cpu_arg(cpu, 0); return 1; } |