Re: [PATCH 5/5] irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI
Guo Ren <[email protected]>
| Newsgroups | org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAJF2gTTeZohiUrn83d-XrxDdMP-LA2eyjpxyqn_-XOk0ko0qbA@mail.gmail.com> |
On Sun, Aug 16, 2026 at 11:28 PM Radu Rendec <[email protected]> wrote: > > On Sun, 2026-08-16 at 07:00 +0000, Guo Ren wrote: > > From: "GUO Ren (XuanTie)" <[email protected]> > > > > IMSIC was defining its own IMSIC_NR_IPI (= 8) which happened to match > > the architecture's IPI_MAX. Now that IPI_MAX is exported from riscv > > asm/smp.h, use the architecture constant and drop the private define. > > > > This keeps the number of multiplexed IPIs in sync with the rest of the > > RISC-V IPI infrastructure. > > > > Signed-off-by: GUO Ren (XuanTie) <[email protected]> > > --- > > drivers/irqchip/irq-riscv-imsic-early.c | 4 ++-- > > drivers/irqchip/irq-riscv-imsic-state.h | 1 - > > 2 files changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c > > index 12efd241ce88..823f5f2ecb3d 100644 > > --- a/drivers/irqchip/irq-riscv-imsic-early.c > > +++ b/drivers/irqchip/irq-riscv-imsic-early.c > > @@ -67,12 +67,12 @@ static int __init imsic_ipi_domain_init(void) > > return 0; > > > > /* Create IMSIC IPI multiplexing */ > > - virq = ipi_mux_create(IMSIC_NR_IPI, imsic_ipi_send); > > + virq = ipi_mux_create(IPI_MAX, imsic_ipi_send); > > if (virq <= 0) > > return virq < 0 ? virq : -ENOMEM; > > > > /* Set vIRQ range */ > > - riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI); > > + riscv_ipi_set_virq_range(virq, IPI_MAX); > > > > /* Announce that IMSIC is providing IPIs */ > > pr_info("%pfwP: providing IPIs using interrupt %d\n", imsic->fwnode, IMSIC_IPI_ID); > > diff --git a/drivers/irqchip/irq-riscv-imsic-state.h b/drivers/irqchip/irq-riscv-imsic-state.h > > index c42ee180b305..878cc192ccec 100644 > > --- a/drivers/irqchip/irq-riscv-imsic-state.h > > +++ b/drivers/irqchip/irq-riscv-imsic-state.h > > @@ -13,7 +13,6 @@ > > #include <linux/timer.h> > > > > #define IMSIC_IPI_ID 1 > > -#define IMSIC_NR_IPI 8 > > > > struct imsic_vector { > > /* Fixed details of the vector */ > > Reviewed-by: Radu Rendec <[email protected]> Thanks for the review, Radu. However, this patch depends on [1]. Would you mind also reviewing [1]? [1]: https://lore.kernel.org/linux-riscv/[email protected]/ -- Best Regards Guo Ren _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv