x86/ioapic: Don't let setaffinity unmask threaded EOI interrupt too early
[ Upstream commit ac14002317721910204b82b9d8611dadb1cec2bb ]
There is an issue with threaded interrupts which are marked ONESHOT
and using the fasteoi handler.
if (IS_ONESHOT())
mask_irq();
....
....
cond_unmask_eoi_irq()
chip->irq_eoi();
So if setaffinity is pending then the interrupt will be moved and then
unmasked, which is wrong as it should be kept masked up to the point where
the threaded handler finished. It's not a real problem, the interrupt will
just be able to fire before the threaded handler has finished, though the irq
masked state will be wrong for a bit.
The patch below should cure the issue. It also renames the horribly
misnomed functions so it becomes clear what they are supposed to do.
Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
Signed-off-by:
Steven Rostedt (VMware) <rostedt@goodmis.org>
[bigeasy: add the body of the patch, use the same functions in both
ifdef paths (spotted by Andy Shevchenko)]
Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Loading
Please sign in to comment