lib: Introduce bitmap to track HARTs waiting for coldboot
authorAnup Patel <anup.patel@wdc.com>
Fri, 21 Dec 2018 04:39:33 +0000 (10:09 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 21 Dec 2018 04:39:33 +0000 (10:09 +0530)
commit6f02b6938f8e607d38ee8de5a59581d554af0d3f
treeedcac6ee2fd3eff80d9d9fedd40070e24ed8c453
parentb023176c17e655f9371df65f6fddc0c1bcbb1fc7
lib: Introduce bitmap to track HARTs waiting for coldboot

On QEMU Virt, max supported HARTs are 8 but number of HARTs
actually depend on "-smp" command-line parameter passed to
QEMU. This creates problems in sbi_hart_wake_coldboot_harts()
because when number of HARTs are less than 8.

To tackle this, we introduce a bitmap to track HARTs waiting
for coldboot to finish. We wake only those HARTs who have
set their bit in coldboot bitmap.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
lib/sbi_hart.c