forked from Mirrors/opensbi
lib: sbi: Update sbi_{entry,init}_count() to take a hart index
All callers already have the hartindex available, so this removes a hartid to hartindex conversion. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
9f86524b58
commit
3962be84d4
@@ -27,13 +27,15 @@ extern void __ae350_disable_coherency(void);
|
||||
|
||||
static int ae350_hart_start(u32 hartid, ulong saddr)
|
||||
{
|
||||
u32 hartindex = sbi_hartid_to_hartindex(hartid);
|
||||
|
||||
/*
|
||||
* Don't send wakeup command when:
|
||||
* 1) boot-time
|
||||
* 2) the target hart is non-sleepable 25-series hart0
|
||||
*/
|
||||
if (!sbi_init_count(hartid) || (is_andes(25) && hartid == 0))
|
||||
return sbi_ipi_raw_send(sbi_hartid_to_hartindex(hartid));
|
||||
if (!sbi_init_count(hartindex) || (is_andes(25) && hartid == 0))
|
||||
return sbi_ipi_raw_send(hartindex);
|
||||
|
||||
/* Write wakeup command to the sleep hart */
|
||||
smu_set_command(&smu, WAKEUP_CMD, hartid);
|
||||
|
Reference in New Issue
Block a user