summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/apic.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-06-28 13:11:53 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-07-03 10:12:30 +0200
commitb7107a67f0d125459fe41f86e8079afd1a5e0b15 (patch)
tree13ed889a14a26a2696d60b5cbe469758f134117f /arch/x86/include/asm/apic.h
parentdfe0cf8b51b07e56ded571e3de0a4a9382517231 (diff)
downloadlinux-b7107a67f0d125459fe41f86e8079afd1a5e0b15.tar.gz
linux-b7107a67f0d125459fe41f86e8079afd1a5e0b15.tar.bz2
linux-b7107a67f0d125459fe41f86e8079afd1a5e0b15.zip
x86/irq: Handle spurious interrupt after shutdown gracefully
Since the rework of the vector management, warnings about spurious interrupts have been reported. Robert provided some more information and did an initial analysis. The following situation leads to these warnings: CPU 0 CPU 1 IO_APIC interrupt is raised sent to CPU1 Unable to handle immediately (interrupts off, deep idle delay) mask() ... free() shutdown() synchronize_irq() clear_vector() do_IRQ() -> vector is clear Before the rework the vector entries of legacy interrupts were statically assigned and occupied precious vector space while most of them were unused. Due to that the above situation was handled silently because the vector was handled and the core handler of the assigned interrupt descriptor noticed that it is shut down and returned. While this has been usually observed with legacy interrupts, this situation is not limited to them. Any other interrupt source, e.g. MSI, can cause the same issue. After adding proper synchronization for level triggered interrupts, this can only happen for edge triggered interrupts where the IO-APIC obviously cannot provide information about interrupts in flight. While the spurious warning is actually harmless in this case it worries users and driver developers. Handle it gracefully by marking the vector entry as VECTOR_SHUTDOWN instead of VECTOR_UNUSED when the vector is freed up. If that above late handling happens the spurious detector will not complain and switch the entry to VECTOR_UNUSED. Any subsequent spurious interrupt on that line will trigger the spurious warning as before. Fixes: 464d12309e1b ("x86/vector: Switch IOAPIC to global reservation mode") Reported-by: Robert Hodaszi <Robert.Hodaszi@digi.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>- Tested-by: Robert Hodaszi <Robert.Hodaszi@digi.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Link: https://lkml.kernel.org/r/20190628111440.459647741@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/apic.h')
0 files changed, 0 insertions, 0 deletions