aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorLeo Yu-Chi Liang <ycliang@andestech.com>2020-06-29 16:27:28 +0800
committerAndes <uboot@andestech.com>2020-07-24 14:56:13 +0800
commite491e15a3f4bdf7e22d5e448c3f0cfb733a8dd8b (patch)
tree5e770fd7c2271624eaed187457662b54d348e2c5 /arch/riscv
parent27b4a4abe60ef4f42e45cb33075ca37369831588 (diff)
downloadu-boot-e491e15a3f4bdf7e22d5e448c3f0cfb733a8dd8b.zip
u-boot-e491e15a3f4bdf7e22d5e448c3f0cfb733a8dd8b.tar.gz
u-boot-e491e15a3f4bdf7e22d5e448c3f0cfb733a8dd8b.tar.bz2
riscv: Fix linking error when building u-boot-spl with no SMP support
Switch off SMP support when building u-boot-spl would cause linking error as follow: undefined reference to 'secondary hart relocate' and 'smp_call_function'. Add macro to wrap up proper code region that needs SMP configuration on. Signed-off by: Leo Liang <ycliang@andestech.com> Cc: rick@andestech.com Reviewed-by: Bin Meng <bin.meng@windriver.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/cpu/start.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index f408e41..bf9fdf3 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -193,6 +193,7 @@ spl_stack_gd_setup:
mv sp, s0
#endif
+#if CONFIG_IS_ENABLED(SMP)
/* set new stack and global data pointer on secondary harts */
spl_secondary_hart_stack_gd_setup:
la a0, secondary_hart_relocate
@@ -207,6 +208,7 @@ spl_secondary_hart_stack_gd_setup:
la a0, secondary_harts_relocation_error
jal printf
jal hang
+#endif
/* set new global data pointer on main hart */
1: mv gp, s0