MIPS: SiByte: Update effective IRQ affinity
PATCH v2 1/1 MIPS: SiByte: Update effective IRQ affinity
Booting an SB1250 kernel with CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK enabled reports:
genirq: irq_chip SB1250-IMR did not update eff. affinity mask of irq 2
The interrupt mapper selects the first online CPU in the requested mask, but sb1250_set_affinity() does not update the effective affinity mask. Returning IRQ_SET_MASK_OK makes the IRQ core copy the requested mask to irq_common_data.affinity, but leaves the separate effective affinity mask empty, triggering irq_validate_effective_affinity().
Update the effective affinity with the single logical CPU selected as the hardware target. Apply the same update to the analogous BCM1480 callback, and use IRQ_SET_MASK_OK explicitly in both callbacks.
The IRQ core already rejects masks without an online CPU for normal affinity changes, so no additional mask validation is needed here.
---
Changes in v2:
- update commit message
- cover bcm1480, remove the check on nr_cpu_ids
arch/mips/sibyte/bcm1480/irq.c | 3 ++- arch/mips/sibyte/sb1250/irq.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/mips/sibyte/bcm1480/irq.c +2 -1
@@ -113,9 +113,10 @@ static int bcm1480_set_affinity(struct irq_data *d, const struct cpumask *mask, ____raw_writeq(cur_ints, IOADDR(A_BCM1480_IMR_MAPPER(cpu) + R_BCM1480_IMR_INTERRUPT_MASK_H + (k*BCM1480_IMR_HL_SPACING))); } } +irq_data_update_effective_affinity (d,cpumask_of (i));raw_spin_unlock_irqrestore (&bcm1480_imr_lock, flags); -return 0 ; +return IRQ_SET_MASK_OK ; }#endif
arch/mips/sibyte/sb1250/irq.c +1 -1
@@ -108,7 +108,7 @@ static int sb1250_set_affinity(struct irq_data *d, const struct cpumask *mask,irq_data_update_effective_affinity (d,cpumask_of (i));raw_spin_unlock_irqrestore (&sb1250_imr_lock, flags); - return 0; + return IRQ_SET_MASK_OK; }#endif
Signature · 1 line
2.53.0