[PATCH 1/2] riscv: Introduce AVAILABLE_HARTS

Leo Liang ycliang at andestech.com
Thu Sep 22 05:32:19 CEST 2022


On Wed, Sep 21, 2022 at 02:34:54PM +0800, Andes wrote:
> From: Rick Chen <rick at andestech.com>
> 
> In SMP all harts will register themself in available_hart
> during start up. Then main hart will send IPI to other harts
> according to this variables. But this mechanism may not
> guarantee that all other harts can jump to next stage.
> 
> When main hart is sending IPI to other hart according to
> available_harts, but other harts maybe still not finish the
> registration. Then the SMP booting will miss some harts finally.
> So let it become an option and it will be enabled by default.
> 
> Please refer to the discussion:
> https://www.mail-archive.com/u-boot@lists.denx.de/msg449997.html
> 
> Signed-off-by: Rick Chen <rick at andestech.com>
> ---
>  arch/riscv/Kconfig                   |  7 +++++++
>  arch/riscv/cpu/cpu.c                 |  2 ++
>  arch/riscv/cpu/start.S               | 13 ++++++++-----
>  arch/riscv/include/asm/global_data.h |  2 ++
>  arch/riscv/lib/asm-offsets.c         |  2 ++
>  arch/riscv/lib/smp.c                 |  2 ++
>  6 files changed, 23 insertions(+), 5 deletions(-)

Reviewed-by: Leo Yu-Chi Liang <ycliang at andestech.com>


More information about the U-Boot mailing list