1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-07 19:24:52 +02:00

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>
This commit is contained in:
Rick Chen
2022-09-21 14:34:54 +08:00
committed by Leo Yu-Chi Liang
parent c2bdf02c9d
commit e0465f80bd
6 changed files with 23 additions and 5 deletions

View File

@@ -46,9 +46,11 @@ static int send_ipi_many(struct ipi_data *ipi, int wait)
}
#if !CONFIG_IS_ENABLED(XIP)
#ifdef CONFIG_AVAILABLE_HARTS
/* skip if hart is not available */
if (!(gd->arch.available_harts & (1 << reg)))
continue;
#endif
#endif
gd->arch.ipi[reg].addr = ipi->addr;