summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress/hotplug.c
diff options
context:
space:
mode:
authorNick Bowler <nbowler@elliptictech.com>2011-08-24 19:55:37 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-10-17 10:12:41 +0200
commitb3377d1865723cea5334954e6ffcb2182b6689c8 (patch)
treee7c5dbe9e9daecf7c419e5302e11eb1e56e0575f /arch/arm/mach-vexpress/hotplug.c
parentARM: 7031/1: entry: Fix Thumb-2 undef handling for multi-CPU kernels (diff)
downloadlinux-b3377d1865723cea5334954e6ffcb2182b6689c8.tar.xz
linux-b3377d1865723cea5334954e6ffcb2182b6689c8.zip
ARM: 7064/1: vexpress: Use wfi macro in platform_do_lowpower.
Current Versatile Express CPU hotplug code includes a hardcoded WFI instruction, in ARM encoding. When the kernel is compiled in Thumb-2 mode, this is invalid and causes the machine to hang hard when a CPU is offlined. Using the wfi macro (which uses the appropriate assembler mnemonic) causes the correct instruction to be emitted in either case. As a consequence of this change, an apparently vestigial "cc" clobber is dropped from the asm (the macro uses "memory" only). Signed-off-by: Nick Bowler <nbowler@elliptictech.com> Reviewed-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-vexpress/hotplug.c')
-rw-r--r--arch/arm/mach-vexpress/hotplug.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index ea4cbfb90a66..3668cf91d2de 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -13,6 +13,7 @@
#include <linux/smp.h>
#include <asm/cacheflush.h>
+#include <asm/system.h>
extern volatile int pen_release;
@@ -62,13 +63,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
- :
- :
- : "memory", "cc");
+ wfi();
if (pen_release == cpu) {
/*