diff options
| author | Xiang W <[email protected]> | 2023-12-10 23:21:39 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-12-11 09:36:57 +0530 |
| commit | a2e254e88162a589c42f0e4f382170fb0d7a6d85 (patch) | |
| tree | 2dcf0a7edd825a818550e6f6fc2199c8bab9895f | |
| parent | 87aa3069d14b52bf87cb14d8f6b3ed51b45465ea (diff) | |
lib: sbi: skip wait_for_coldboot when coolboot done
When warmboot via HSM, coolboot has been completed and
wait_for_coldboot can be skipped to speed up.
Signed-off-by: Xiang W <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 005985d9..6a98e134 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -195,6 +195,9 @@ static void wait_for_coldboot(struct sbi_scratch *scratch, u32 hartid) { unsigned long saved_mie, cmip; + if (__smp_load_acquire(&coldboot_done)) + return; + /* Save MIE CSR */ saved_mie = csr_read(CSR_MIE); |
