Commit 59da23b9 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

ARM: sunxi: fix build for THUMB2_KERNEL

commit 1146b600 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: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent adbbaa36
...@@ -74,6 +74,7 @@ struct secondary_data { ...@@ -74,6 +74,7 @@ struct secondary_data {
}; };
extern struct secondary_data secondary_data; extern struct secondary_data secondary_data;
extern volatile int pen_release; extern volatile int pen_release;
extern void secondary_startup(void);
extern int __cpu_disable(void); extern int __cpu_disable(void);
......
obj-$(CONFIG_ARCH_SUNXI) += sunxi.o obj-$(CONFIG_ARCH_SUNXI) += sunxi.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_SMP) += platsmp.o
#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)
...@@ -82,7 +82,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu, ...@@ -82,7 +82,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu,
spin_lock(&cpu_lock); spin_lock(&cpu_lock);
/* Set CPU boot address */ /* Set CPU boot address */
writel(virt_to_phys(sun6i_secondary_startup), writel(virt_to_phys(secondary_startup),
cpucfg_membase + CPUCFG_PRIVATE0_REG); cpucfg_membase + CPUCFG_PRIVATE0_REG);
/* Assert the CPU core in reset */ /* Assert the CPU core in reset */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment