提交 e491e15a 编写于 作者: L Leo Yu-Chi Liang 提交者: Andes

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: NBin Meng <bin.meng@windriver.com>
上级 27b4a4ab
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册