genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jul 2021 21:51:48 +0000 (23:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Aug 2021 06:59:15 +0000 (08:59 +0200)
commit4e52a4fe6f445a59a88c7ba60dd253a3643f0589
tree70a38cf72d10b0c1926fcb860c3a4f67b89cf79d
parent2a28b52306f2d0797159b7e9819d4af3f0c4ef22
genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP

commit 826da771291fc25a428e871f9e7fb465e390f852 upstream.

X86 IO/APIC and MSI interrupts (when used without interrupts remapping)
require that the affinity setup on startup is done before the interrupt is
enabled for the first time as the non-remapped operation mode cannot safely
migrate enabled interrupts from arbitrary contexts. Provide a new irq chip
flag which allows affected hardware to request this.

This has to be opt-in because there have been reports in the past that some
interrupt chips cannot handle affinity setting before startup.

Fixes: 18404756765c ("genirq: Expose default irq affinity mask (take 3)")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210729222542.779791738@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/irq.h
kernel/irq/chip.c