[PATCH 61/62] ARM: sunxi: fix build for THUMB2_KERNEL

Arnd Bergmann arnd at arndb.de
Wed Mar 19 15:29:58 EDT 2014


Building an SMP kernel for the sunxi platform with THUMB2 instructions
fails with this error at the moment:

headsmp.S:7: Error: Thumb encoding does not support an immediate here -- `msr cpsr_fsxc,#0xd3'

This changes the code to use a register for loading the
value instead, which works in both ARM and THUMB mode.

Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 arch/arm/mach-sunxi/headsmp.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/headsmp.S b/arch/arm/mach-sunxi/headsmp.S
index a10d494..a8e0fef 100644
--- a/arch/arm/mach-sunxi/headsmp.S
+++ b/arch/arm/mach-sunxi/headsmp.S
@@ -4,6 +4,7 @@
         .section ".text.head", "ax"
 
 ENTRY(sun6i_secondary_startup)
-	msr	cpsr_fsxc, #0xd3
+	mov	r0, #0xd3
+	msr	cpsr_fsxc, r0
 	b	secondary_startup
 ENDPROC(sun6i_secondary_startup)
-- 
1.8.3.2




More information about the linux-arm-kernel mailing list