x86/ioapic: Force affinity setup before startup
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jul 2021 21:51:49 +0000 (23:51 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 10 Aug 2021 08:59:21 +0000 (10:59 +0200)
commit0c0e37dc11671384e53ba6ede53a4d91162a2cc5
tree799af0d26c6b2514674f87931354f2d5e596910e
parent826da771291fc25a428e871f9e7fb465e390f852
x86/ioapic: Force affinity setup before startup

The IO/APIC cannot handle interrupt affinity changes safely after startup
other than from an interrupt handler. The startup sequence in the generic
interrupt code violates that assumption.

Mark the irq chip with the new IRQCHIP_AFFINITY_PRE_STARTUP flag so that
the default interrupt setting happens before the interrupt is started up
for the first time.

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.832143400@linutronix.de
arch/x86/kernel/apic/io_apic.c