Message ID | 20200516063901.18365-5-anup.patel@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | More improvements for multiple PLICs | expand |
On 2020-05-16 07:39, Anup Patel wrote: > For multiple PLIC instances, each PLIC can only target a subset of > CPUs which is represented by "lmask" in the "struct plic_priv". > > Currently, the default irq affinity for each PLIC interrupt is all > online CPUs which is illegal value for default irq affinity when we > have multiple PLIC instances. To fix this, we now set "lmask" as the > default irq affinity in for each interrupt in plic_irqdomain_map(). > > Signed-off-by: Anup Patel <anup.patel@wdc.com> > --- > drivers/irqchip/irq-sifive-plic.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/irqchip/irq-sifive-plic.c > b/drivers/irqchip/irq-sifive-plic.c > index e42fc082ad18..9af5e2fd2574 100644 > --- a/drivers/irqchip/irq-sifive-plic.c > +++ b/drivers/irqchip/irq-sifive-plic.c > @@ -174,6 +174,7 @@ static int plic_irqdomain_map(struct irq_domain > *d, unsigned int irq, > irq_domain_set_info(d, irq, hwirq, &priv->chip, d->host_data, > handle_fasteoi_irq, NULL, NULL); > irq_set_noprobe(irq); > + irq_set_affinity(irq, &priv->lmask); > return 0; > } Isn't that a fix? If so, please add a Fixes: tag, as well as a CC to stable if you think it should be backported. Thanks, M.
> -----Original Message----- > From: Marc Zyngier <maz@kernel.org> > Sent: 16 May 2020 18:01 > To: Anup Patel <Anup.Patel@wdc.com> > Cc: Palmer Dabbelt <palmer@dabbelt.com>; Paul Walmsley > <paul.walmsley@sifive.com>; Thomas Gleixner <tglx@linutronix.de>; Jason > Cooper <jason@lakedaemon.net>; Atish Patra <Atish.Patra@wdc.com>; Alistair > Francis <Alistair.Francis@wdc.com>; Anup Patel <anup@brainfault.org>; linux- > riscv@lists.infradead.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 4/4] irqchip/sifive-plic: Set default irq affinity in > plic_irqdomain_map() > > On 2020-05-16 07:39, Anup Patel wrote: > > For multiple PLIC instances, each PLIC can only target a subset of > > CPUs which is represented by "lmask" in the "struct plic_priv". > > > > Currently, the default irq affinity for each PLIC interrupt is all > > online CPUs which is illegal value for default irq affinity when we > > have multiple PLIC instances. To fix this, we now set "lmask" as the > > default irq affinity in for each interrupt in plic_irqdomain_map(). > > > > Signed-off-by: Anup Patel <anup.patel@wdc.com> > > --- > > drivers/irqchip/irq-sifive-plic.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/irqchip/irq-sifive-plic.c > > b/drivers/irqchip/irq-sifive-plic.c > > index e42fc082ad18..9af5e2fd2574 100644 > > --- a/drivers/irqchip/irq-sifive-plic.c > > +++ b/drivers/irqchip/irq-sifive-plic.c > > @@ -174,6 +174,7 @@ static int plic_irqdomain_map(struct irq_domain > > *d, unsigned int irq, > > irq_domain_set_info(d, irq, hwirq, &priv->chip, d->host_data, > > handle_fasteoi_irq, NULL, NULL); > > irq_set_noprobe(irq); > > + irq_set_affinity(irq, &priv->lmask); > > return 0; > > } > > Isn't that a fix? If so, please add a Fixes: tag, as well as a CC to stable if you > think it should be backported. This is certainly a fix. I will add Fixes: tag like you suggested. Regards, Anup
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index e42fc082ad18..9af5e2fd2574 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -174,6 +174,7 @@ static int plic_irqdomain_map(struct irq_domain *d, unsigned int irq, irq_domain_set_info(d, irq, hwirq, &priv->chip, d->host_data, handle_fasteoi_irq, NULL, NULL); irq_set_noprobe(irq); + irq_set_affinity(irq, &priv->lmask); return 0; }
For multiple PLIC instances, each PLIC can only target a subset of CPUs which is represented by "lmask" in the "struct plic_priv". Currently, the default irq affinity for each PLIC interrupt is all online CPUs which is illegal value for default irq affinity when we have multiple PLIC instances. To fix this, we now set "lmask" as the default irq affinity in for each interrupt in plic_irqdomain_map(). Signed-off-by: Anup Patel <anup.patel@wdc.com> --- drivers/irqchip/irq-sifive-plic.c | 1 + 1 file changed, 1 insertion(+)