forked from Mirrors/opensbi
lib: Simplify sbi_platform ipi_init() hooks
Instead of having separate ipi_init() hooks for cold and warm boot, this patch updates struct sbi_platform to have just one ipi_init() hook. The type of boot (cold or warm) is now a boolean flag parameter for the updated ipi_init() hook. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
@@ -50,11 +50,7 @@ static void __attribute__((noreturn)) init_coldboot(struct sbi_scratch *scratch,
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
rc = sbi_ipi_cold_init(scratch);
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
rc = sbi_ipi_warm_init(scratch, hartid);
|
||||
rc = sbi_ipi_init(scratch, hartid, TRUE);
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
@@ -125,7 +121,7 @@ static void __attribute__((noreturn)) init_warmboot(struct sbi_scratch *scratch,
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
rc = sbi_ipi_warm_init(scratch, hartid);
|
||||
rc = sbi_ipi_init(scratch, hartid, FALSE);
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
|
Reference in New Issue
Block a user