Patch "x86/ioapic: Force affinity setting in setup_ioapic_dest()" has been added to the 4.2-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
x86/ioapic: Force affinity setting in setup_ioapic_dest()
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-ioapic-force-affinity-setting-in-setup_ioapic_dest.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4857c91f0d195f05908fff296ba1ec5fca87066cMon Sep 17 00:00:00 2001
From: Thomas Gleixner <[email protected]>
Date: Mon, 14 Sep 2015 12:00:55 +0200
Subject: x86/ioapic: Force affinity setting in setup_ioapic_dest()
From: Thomas Gleixner <[email protected]>
commit 4857c91f0d195f05908fff296ba1ec5fca87066c upstream.
The recent ioapic cleanups changed the affinity setting in setup_ioapic_dest() from a direct write to the hardware to the delayed affinity setup via irq_set_affinity().
That results in a warning from chained_irq_exit():
WARNING: CPU: 0 PID: 5 at kernel/irq/migration.c:32 irq_move_masked_irq [<ffffffff810a0a88>] irq_move_masked_irq+0xb8/0xc0 [<ffffffff8103c161>] ioapic_ack_level+0x111/0x130 [<ffffffff812bbfe8>] intel_gpio_irq_handler+0x148/0x1c0
The reason is that irq_set_affinity() does not write directly to the hardware. It marks the affinity setting as pending and executes it from the next interrupt. The chained handler infrastructure does not take the irq descriptor lock for performance reasons because such a chained interrupt is not visible to any interfaces. So the delayed affinity setting triggers the warning in irq_move_masked_irq().
Restore the old behaviour by calling the set_affinity function of the ioapic chip in setup_ioapic_dest(). This is safe as none of the interrupts can be on the fly at this point.
--- arch/x86/kernel/apic/io_apic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/x86/kernel/apic/io_apic.c +3 -2
@@ -2522,6 +2522,7 @@ void __init setup_ioapic_dest(void)int pin, ioapic, irq, irq_entry;const struct cpumask *mask;struct irq_data *idata; +struct irq_chip *chip;if (skip_ioapic_setup ==1 )return ;
@@ -2545,9 +2546,9 @@ void __init setup_ioapic_dest(void) else mask = apic->target_cpus (); - irq_set_affinity(irq, mask); + chip =irq_data_get_irq_chip (idata); + chip->irq_set_affinity(idata, mask, false); } - }#endif
Patches currently in stable-queue which might be from [email protected] are
queue-4.2/time-fix-timekeeping_freqadjust-s-incorrect-use-of-abs-instead-of-abs64.patch queue-4.2/x86-platform-fix-geode-lx-timekeeping-in-the-generic-x86-build.patch queue-4.2/x86-pci-intel_mid_pci-work-around-for-irq0-assignment.patch queue-4.2/x86-ioapic-force-affinity-setting-in-setup_ioapic_dest.patch queue-4.2/x86-alternatives-make-optimize_nops-interrupt-safe-and-synced.patch queue-4.2/x86-apic-serialize-lvtt-and-tsc_deadline-writes.patch queue-4.2/perf-x86-intel-fix-constraint-access.patch queue-4.2/locking-qspinlock-x86-only-emit-the-test-and-set-fallback-when-building-guest-support.patch queue-4.2/locking-qspinlock-x86-fix-performance-regression-under-unaccelerated-vms.patch