ARM: sunxi: fix build for THUMB2_KERNEL
authorArnd Bergmann <arnd@arndb.de>
Sun, 16 Mar 2014 17:04:54 +0000 (18:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 03:51:48 +0000 (20:51 -0700)
commit 1146b600044de64af0ef775025731eeef1fa2189 upstream.

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'

Since the generic secondary_startup function already does
the same thing in a safe way, we can just drop the private
sunxi implementation and jump straight to secondary_startup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/smp.h
arch/arm/mach-sunxi/Makefile
arch/arm/mach-sunxi/headsmp.S [deleted file]
arch/arm/mach-sunxi/platsmp.c

index 22a3b9b5d4a16fd4ece50bdfc83859f6ea38352f..4157aec4e3076ce853a8497ce81743a38990504a 100644 (file)
@@ -74,6 +74,7 @@ struct secondary_data {
 };
 extern struct secondary_data secondary_data;
 extern volatile int pen_release;
+extern void secondary_startup(void);
 
 extern int __cpu_disable(void);
 
index d9397202d6ecd8e7ed4d0908fd656b559a41ebb2..27b168f121a1587931ba851c4ecc51cdaa38c026 100644 (file)
@@ -1,2 +1,2 @@
 obj-$(CONFIG_ARCH_SUNXI) += sunxi.o
-obj-$(CONFIG_SMP) += platsmp.o headsmp.o
+obj-$(CONFIG_SMP) += platsmp.o
diff --git a/arch/arm/mach-sunxi/headsmp.S b/arch/arm/mach-sunxi/headsmp.S
deleted file mode 100644 (file)
index a10d494..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <linux/linkage.h>
-#include <linux/init.h>
-
-        .section ".text.head", "ax"
-
-ENTRY(sun6i_secondary_startup)
-       msr     cpsr_fsxc, #0xd3
-       b       secondary_startup
-ENDPROC(sun6i_secondary_startup)
index 7b141d8342a1382c94a5d518eb60dac7d9cb69cb..0c7dbce033cc28e1fa93cca2500abc3f44113938 100644 (file)
@@ -82,7 +82,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu,
        spin_lock(&cpu_lock);
 
        /* Set CPU boot address */
-       writel(virt_to_phys(sun6i_secondary_startup),
+       writel(virt_to_phys(secondary_startup),
               cpucfg_membase + CPUCFG_PRIVATE0_REG);
 
        /* Assert the CPU core in reset */