diff options
author | Rick Chen <rick@andestech.com> | 2022-09-21 14:34:54 +0800 |
---|---|---|
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | 2022-09-26 14:29:13 +0800 |
commit | e0465f80bd33f239612ee9f0ee7b6cf13d2f5b4d (patch) | |
tree | ddd81b0d82d1c0e8abf0b80853fdde07407bd5e6 /arch/riscv/include/asm/global_data.h | |
parent | c2bdf02c9d40da7154fea46b7d10343fe9f14209 (diff) |
riscv: Introduce AVAILABLE_HARTS
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@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'arch/riscv/include/asm/global_data.h')
-rw-r--r-- | arch/riscv/include/asm/global_data.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h index b3c79e1760..858594a191 100644 --- a/arch/riscv/include/asm/global_data.h +++ b/arch/riscv/include/asm/global_data.h @@ -28,8 +28,10 @@ struct arch_global_data { struct ipi_data ipi[CONFIG_NR_CPUS]; #endif #if !CONFIG_IS_ENABLED(XIP) +#ifdef CONFIG_AVAILABLE_HARTS ulong available_harts; #endif +#endif }; #include <asm-generic/global_data.h> |