diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-30 06:07:35 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-20 10:09:10 -0500 |
commit | 3c030beabf937b1d3b4ecaedfd1fb2f1e2aa0c70 (patch) | |
tree | 3cac64838c83ecc2d0d070be268fb087dffd8d4b /arch/arm/mach-s5pv310/hotplug.c | |
parent | 2c0136dba4e43b0916ccc9ecc7f11e6d6b73f046 (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-s5pv310/hotplug.c')
-rw-r--r-- | arch/arm/mach-s5pv310/hotplug.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/mach-s5pv310/hotplug.c b/arch/arm/mach-s5pv310/hotplug.c index 03652c3605f6..d7be70ac7536 100644 --- a/arch/arm/mach-s5pv310/hotplug.c +++ b/arch/arm/mach-s5pv310/hotplug.c | |||
@@ -13,14 +13,11 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/completion.h> | ||
17 | 16 | ||
18 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
19 | 18 | ||
20 | extern volatile int pen_release; | 19 | extern volatile int pen_release; |
21 | 20 | ||
22 | static DECLARE_COMPLETION(cpu_killed); | ||
23 | |||
24 | static inline void cpu_enter_lowpower(void) | 21 | static inline void cpu_enter_lowpower(void) |
25 | { | 22 | { |
26 | unsigned int v; | 23 | unsigned int v; |
@@ -98,7 +95,7 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
98 | 95 | ||
99 | int platform_cpu_kill(unsigned int cpu) | 96 | int platform_cpu_kill(unsigned int cpu) |
100 | { | 97 | { |
101 | return wait_for_completion_timeout(&cpu_killed, 5000); | 98 | return 1; |
102 | } | 99 | } |
103 | 100 | ||
104 | /* | 101 | /* |
@@ -118,9 +115,6 @@ void platform_cpu_die(unsigned int cpu) | |||
118 | } | 115 | } |
119 | #endif | 116 | #endif |
120 | 117 | ||
121 | printk(KERN_NOTICE "CPU%u: shutdown\n", cpu); | ||
122 | complete(&cpu_killed); | ||
123 | |||
124 | /* | 118 | /* |
125 | * we're ready for shutdown now, so do it | 119 | * we're ready for shutdown now, so do it |
126 | */ | 120 | */ |