[PATCH 6/7] riscv: Remove CONFIG_IS_ENABLED(SMP) in global data
Atish Patra
atishp at atishpatra.org
Sat Apr 11 03:01:59 CEST 2020
On Wed, Apr 8, 2020 at 6:42 AM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Currently generic-asm-offsets.h and asm-offsets.h are generated based
> on U-Boot proper config options. The same asm-offsets files are used
> when building U-Boot SPL/TPL.
>
> But the generated macros, e.g.: GD_AVAILABLE_HARTS, create potential
> mismatch if U-Boot proper has different config options from U-Boot
> SPL/TPL, like in this case, SMP.
>
> Remove CONFIG_IS_ENABLED(SMP) in global data to get a consistent value
> of GD_AVAILABLE_HARTS.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> arch/riscv/include/asm/global_data.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h
> index 72fb4b4..dc9ba1f 100644
> --- a/arch/riscv/include/asm/global_data.h
> +++ b/arch/riscv/include/asm/global_data.h
> @@ -24,9 +24,7 @@ struct arch_global_data {
> #ifdef CONFIG_ANDES_PLMT
> void __iomem *plmt; /* plmt base address */
> #endif
> -#if CONFIG_IS_ENABLED(SMP)
> struct ipi_data ipi[CONFIG_NR_CPUS];
> -#endif
> #ifndef CONFIG_XIP
> ulong available_harts;
> #endif
CONFIG_NR_CPUS is only defined for SMP/SPL_SMP. It will result in
compilation error if somebody tries to compile non-smp u-boot.
How about moving available_harts to the top right after boot_hart?
> --
> 2.7.4
>
--
Regards,
Atish
More information about the U-Boot
mailing list