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:
Anup Patel
2023-04-20 10:18:08 +05:30
committed by Anup Patel
parent 1df52fa7e8
commit 355796c5bc
2 changed files with 70 additions and 17 deletions

View File

@@ -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;