Message ID | 20240923115700.381916-3-apatel@ventanamicro.com |
---|---|
State | Superseded |
Headers | show |
Series | OpenSBI domain data support | expand |
On 2024-09-23 6:56 AM, Anup Patel wrote: > The sbi_domain_root_add_memrange() should be preferred for creating > multiple memregions over a range. Update IMSIC driver to use > sbi_domain_root_add_memrange() instead of explicity registering typo: explicitly > memregions. > > Signed-off-by: Anup Patel <apatel@ventanamicro.com> > --- > lib/utils/irqchip/imsic.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
On Thu, Oct 10, 2024 at 4:34 AM Samuel Holland <samuel.holland@sifive.com> wrote: > > On 2024-09-23 6:56 AM, Anup Patel wrote: > > The sbi_domain_root_add_memrange() should be preferred for creating > > multiple memregions over a range. Update IMSIC driver to use > > sbi_domain_root_add_memrange() instead of explicity registering > > typo: explicitly Okay, I will update. > > > memregions. > > > > Signed-off-by: Anup Patel <apatel@ventanamicro.com> > > --- > > lib/utils/irqchip/imsic.c | 14 ++++++-------- > > 1 file changed, 6 insertions(+), 8 deletions(-) > > Reviewed-by: Samuel Holland <samuel.holland@sifive.com> > Thanks, Anup
diff --git a/lib/utils/irqchip/imsic.c b/lib/utils/irqchip/imsic.c index bac72d21..ddb372fb 100644 --- a/lib/utils/irqchip/imsic.c +++ b/lib/utils/irqchip/imsic.c @@ -348,7 +348,6 @@ int imsic_data_check(struct imsic_data *imsic) int imsic_cold_irqchip_init(struct imsic_data *imsic) { int i, rc; - struct sbi_domain_memregion reg; /* Sanity checks */ rc = imsic_data_check(imsic); @@ -378,13 +377,12 @@ int imsic_cold_irqchip_init(struct imsic_data *imsic) /* Add IMSIC regions to the root domain */ for (i = 0; i < IMSIC_MAX_REGS && imsic->regs[i].size; i++) { - sbi_domain_memregion_init(imsic->regs[i].addr, - imsic->regs[i].size, - (SBI_DOMAIN_MEMREGION_MMIO | - SBI_DOMAIN_MEMREGION_M_READABLE | - SBI_DOMAIN_MEMREGION_M_WRITABLE), - ®); - rc = sbi_domain_root_add_memregion(®); + rc = sbi_domain_root_add_memrange(imsic->regs[i].addr, + imsic->regs[i].size, + IMSIC_MMIO_PAGE_SZ, + SBI_DOMAIN_MEMREGION_MMIO | + SBI_DOMAIN_MEMREGION_M_READABLE | + SBI_DOMAIN_MEMREGION_M_WRITABLE); if (rc) return rc; }
The sbi_domain_root_add_memrange() should be preferred for creating multiple memregions over a range. Update IMSIC driver to use sbi_domain_root_add_memrange() instead of explicity registering memregions. Signed-off-by: Anup Patel <apatel@ventanamicro.com> --- lib/utils/irqchip/imsic.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)