Re: [PATCH v3 3/5] irqchip/mips-gic: Enable interrupt when moving affinity across clusters

From: Benoît Monin

Date: Mon Sep 28 2026 - 09:57:21 EST


On Monday, 28 September 2026 at 10:35:18 CEST, Thomas Bogendoerfer wrote:
> > drivers/irqchip/irq-mips-gic.c | 16 +++++++++++++---
> > 1 file changed, 13 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
> > index f2ae60d39d66..4b76a65f12c9 100644
> > --- a/drivers/irqchip/irq-mips-gic.c
> > +++ b/drivers/irqchip/irq-mips-gic.c
> > @@ -390,14 +390,17 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
> >
> > /*
> > * If we're moving affinity between clusters, stop routing the
> > - * interrupt to any VP(E) in the old cluster.
> > + * interrupt to any VP(E) in the old cluster and disable
> > + * the interrupt in that cluster.
> > */
> > if (cl != old_cl) {
> > if (gic_irq_lock_cluster(d)) {
> > write_gic_redir_map_vp(irq, 0);
> > + write_gic_redir_rmask(irq);
> > mips_cm_unlock_other();
> > } else {
> > write_gic_map_vp(irq, 0);
> > + write_gic_rmask(irq);
> > }
> > }
> >
> > @@ -409,10 +412,17 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
> >
> > /*
> > * If we're moving affinity between clusters, configure the interrupt
> > - * trigger type in the new cluster.
> > + * trigger type and enable the interrupt in the new cluster.
> > */
> > - if (cl != old_cl)
> > + if (cl != old_cl) {
> > gic_set_type_locked(d, irqd_get_trigger_type(d));
> > + if (gic_irq_lock_cluster(d)) {
> > + write_gic_redir_smask(irq);
> > + mips_cm_unlock_other();
> > + } else {
> > + write_gic_smask(irq);
> > + }
> > + }
>
> shouldn't this be done depending on the mask state in the old cluster ?

Good point, the interrupt could be disabled when changing its affinity. I'll
fix that.

Best regards,
--
Benoît Monin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com