]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: Fix linking error when building u-boot-spl with no SMP support
authorLeo Yu-Chi Liang <ycliang@andestech.com>
Mon, 29 Jun 2020 08:27:28 +0000 (16:27 +0800)
committerAndes <uboot@andestech.com>
Fri, 24 Jul 2020 06:56:13 +0000 (14:56 +0800)
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>
arch/riscv/cpu/start.S

index f408e41ab9dc74311acf7386817dc2df16663996..bf9fdf369b4473d02b541f0f296330cfcafaa942 100644 (file)
@@ -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