forked from Mirrors/opensbi
lib: utils/irqchip: Use scratch space to save per-HART IMSIC pointer
Instead of using a global array indexed by hartid, we should use scratch space to save per-HART IMSIC pointer and IMSIC file number. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
This commit is contained in:
@@ -72,11 +72,11 @@ static int irqchip_imsic_cold_init(void *fdt, int nodeoff,
|
||||
if (rc || !id->targets_mmode)
|
||||
goto fail_free_data;
|
||||
|
||||
rc = irqchip_imsic_update_hartid_table(fdt, nodeoff, id);
|
||||
rc = imsic_cold_irqchip_init(id);
|
||||
if (rc)
|
||||
goto fail_free_data;
|
||||
|
||||
rc = imsic_cold_irqchip_init(id);
|
||||
rc = irqchip_imsic_update_hartid_table(fdt, nodeoff, id);
|
||||
if (rc)
|
||||
goto fail_free_data;
|
||||
|
||||
|
Reference in New Issue
Block a user