aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/hotplug.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-11-30 06:07:35 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-20 10:09:10 -0500
commit3c030beabf937b1d3b4ecaedfd1fb2f1e2aa0c70 (patch)
tree3cac64838c83ecc2d0d070be268fb087dffd8d4b /arch/arm/mach-ux500/hotplug.c
parent2c0136dba4e43b0916ccc9ecc7f11e6d6b73f046 (diff)
ARM: CPU hotplug: move cpu_killed completion to core code
We always need to wait for the dying CPU to reach a safe state before taking it down, irrespective of the requirements of the platform. Move the completion code into the ARM SMP hotplug code rather than having each platform re-implement this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500/hotplug.c')
-rw-r--r--arch/arm/mach-ux500/hotplug.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index b782a03024be..7a4890b96e5c 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -11,14 +11,11 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <linux/completion.h>
15 14
16#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
17 16
18extern volatile int pen_release; 17extern volatile int pen_release;
19 18
20static DECLARE_COMPLETION(cpu_killed);
21
22static inline void platform_do_lowpower(unsigned int cpu) 19static inline void platform_do_lowpower(unsigned int cpu)
23{ 20{
24 flush_cache_all(); 21 flush_cache_all();
@@ -38,7 +35,7 @@ static inline void platform_do_lowpower(unsigned int cpu)
38 35
39int platform_cpu_kill(unsigned int cpu) 36int platform_cpu_kill(unsigned int cpu)
40{ 37{
41 return wait_for_completion_timeout(&cpu_killed, 5000); 38 return 1;
42} 39}
43 40
44/* 41/*
@@ -58,9 +55,6 @@ void platform_cpu_die(unsigned int cpu)
58 } 55 }
59#endif 56#endif
60 57
61 printk(KERN_NOTICE "CPU%u: shutdown\n", cpu);
62 complete(&cpu_killed);
63
64 /* directly enter low power state, skipping secure registers */ 58 /* directly enter low power state, skipping secure registers */
65 platform_do_lowpower(cpu); 59 platform_do_lowpower(cpu);
66} 60}