diff options
author | Luis Araneda <luaraneda@gmail.com> | 2019-08-08 08:52:42 -0400 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-08-14 03:40:35 -0400 |
commit | 5f595063affa8590a03a4f3d30bb28b1560f9d49 (patch) | |
tree | cb3aea398f6a3b7b99e7a6eb95e0d82ce02a2156 | |
parent | 5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff) |
ARM: zynq: Support smp in thumb mode
Add .arm directive to headsmp.S to ensure that the
CPU starts in 32-bit ARM mode and the correct code
size is copied on smp bring-up.
This is related to the fix applied to SoCFPGA by
commit 5616f36713ea
("ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel")
Additionally, start secondary CPUs on secondary_startup_arm
to automatically switch from ARM to thumb on a thumb kernel
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Suggested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | arch/arm/mach-zynq/headsmp.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-zynq/platsmp.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S index ab85003cf9ad..3449e0d1f990 100644 --- a/arch/arm/mach-zynq/headsmp.S +++ b/arch/arm/mach-zynq/headsmp.S | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <asm/assembler.h> | 8 | #include <asm/assembler.h> |
9 | 9 | ||
10 | .arm | ||
11 | |||
10 | ENTRY(zynq_secondary_trampoline) | 12 | ENTRY(zynq_secondary_trampoline) |
11 | ARM_BE8(setend be) @ ensure we are in BE8 mode | 13 | ARM_BE8(setend be) @ ensure we are in BE8 mode |
12 | ldr r0, zynq_secondary_trampoline_jump | 14 | ldr r0, zynq_secondary_trampoline_jump |
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c index a7cfe07156f4..38728badabd4 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c | |||
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(zynq_cpun_start); | |||
81 | 81 | ||
82 | static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle) | 82 | static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle) |
83 | { | 83 | { |
84 | return zynq_cpun_start(__pa_symbol(secondary_startup), cpu); | 84 | return zynq_cpun_start(__pa_symbol(secondary_startup_arm), cpu); |
85 | } | 85 | } |
86 | 86 | ||
87 | /* | 87 | /* |