aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap-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-omap2/omap-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-omap2/omap-hotplug.c')
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 6cee456ca542..ace979d74bfc 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -17,16 +17,13 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/smp.h> 19#include <linux/smp.h>
20#include <linux/completion.h>
21 20
22#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
23#include <mach/omap4-common.h> 22#include <mach/omap4-common.h>
24 23
25static DECLARE_COMPLETION(cpu_killed);
26
27int platform_cpu_kill(unsigned int cpu) 24int platform_cpu_kill(unsigned int cpu)
28{ 25{
29 return wait_for_completion_timeout(&cpu_killed, 5000); 26 return 1;
30} 27}
31 28
32/* 29/*
@@ -42,8 +39,7 @@ void platform_cpu_die(unsigned int cpu)
42 this_cpu, cpu); 39 this_cpu, cpu);
43 BUG(); 40 BUG();
44 } 41 }
45 pr_notice("CPU%u: shutdown\n", cpu); 42
46 complete(&cpu_killed);
47 flush_cache_all(); 43 flush_cache_all();
48 dsb(); 44 dsb();
49 45