forked from Mirrors/opensbi
Introduce sbi_current_hartid()
Use this helper instead of hardcoding csr_read(mhartid). Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:
@@ -163,7 +163,7 @@ static atomic_t coldboot_lottery = ATOMIC_INITIALIZER(0);
|
||||
void __attribute__((noreturn)) sbi_init(struct sbi_scratch *scratch)
|
||||
{
|
||||
bool coldboot = FALSE;
|
||||
u32 hartid = csr_read(mhartid);
|
||||
u32 hartid = sbi_current_hartid();
|
||||
|
||||
if (atomic_add_return(&coldboot_lottery, 1) == 1)
|
||||
coldboot = TRUE;
|
||||
|
Reference in New Issue
Block a user