diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-07-29 23:51:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-18 08:57:02 +0200 |
commit | eda32c21882ce98b6dcd09399119a17dcfb5241e (patch) | |
tree | b90800dabd4fb2d9681cccf8a3bcde9a907a1e58 /kernel/irq | |
parent | 06b3477436086cee52776f3a5cf9ca05ab17a6a9 (diff) | |
download | linux-stable-eda32c21882ce98b6dcd09399119a17dcfb5241e.tar.gz linux-stable-eda32c21882ce98b6dcd09399119a17dcfb5241e.tar.bz2 linux-stable-eda32c21882ce98b6dcd09399119a17dcfb5241e.zip |
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>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index b76703b2c0af..856f0297dc73 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -265,8 +265,11 @@ int irq_startup(struct irq_desc *desc, bool resend, bool force) } else { switch (__irq_startup_managed(desc, aff, force)) { case IRQ_STARTUP_NORMAL: + if (d->chip->flags & IRQCHIP_AFFINITY_PRE_STARTUP) + irq_setup_affinity(desc); ret = __irq_startup(desc); - irq_setup_affinity(desc); + if (!(d->chip->flags & IRQCHIP_AFFINITY_PRE_STARTUP)) + irq_setup_affinity(desc); break; case IRQ_STARTUP_MANAGED: irq_do_set_affinity(d, aff, false); |