summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2024-03-15 19:55:23 +0530
committerAnup Patel <[email protected]>2024-04-05 17:48:23 +0530
commitbeb0cd177f10a6bdafd73aac19059fecf6a07a91 (patch)
treeb54f4bd17bd293cb3e27c62ffdf3338571758937 /lib/utils
parentf5375bc15e9f3e577dfc24f9095a3e37246a3fa3 (diff)
lib: sbi: Simplify wait_for_coldboot() implementation
On QEMU virt machine with large number of HARTs, some of the HARTs randomly fail to come out of wait_for_coldboot() due to one of the following race-conditions: 1) Failing HARTs are not able to acquire the coldboot_lock and update the coldboot_hartmask in wait_for_coldboot() before the coldboot HART acquires the coldboot_lock and sends IPI in wake_coldboot_harts() hence the failing HARTs never receive IPI from the coldboot HART. 2) Failing HARTs acquire the coldbood_lock and update the coldboot_hartmask before coldboot HART does sbi_scratch_init() so the sbi_hartmask_set_hartid() does not update the coldboot_hartmask on the failing HARTs hence they never receive IPI from the coldboot HART. To address this, use a simple busy-loop in wait_for_coldboot() for polling on coldboot_done flag. Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils')
0 files changed, 0 insertions, 0 deletions