From: Nick Bowler Date: Wed, 24 Aug 2011 17:55:37 +0000 (+0100) Subject: ARM: 7064/1: vexpress: Use wfi macro in platform_do_lowpower. X-Git-Tag: next-20110913~103^2~1^4~14 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a4e4cd2b06dc2825ca27eed3a4cd15fd6e61942;p=karo-tx-linux.git 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 Reviewed-by: Jamie Iles Signed-off-by: Russell King --- 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 #include +#include 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) { /*