forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit86a82ae
committed
x86/ioapic: Unbreak check_timer()
Several people reported in the kernel bugzilla that between v4.12 and v4.13the magic which works around broken hardware and BIOSes to find the propertimer interrupt delivery mode stopped working for some older affectedplatforms which need to fall back to ExtINT delivery mode.The reason is that the core code changed to keep track of the masked anddisabled state of an interrupt line more accurately to avoid the expensivehardware operations.That broke an assumption in i8259_make_irq() which invokes disable_irq_nosync(); irq_set_chip_and_handler(); enable_irq();Up to v4.12 this worked because enable_irq() unconditionally unmasked theinterrupt line, but after the state tracking improvements this is notlonger the case because the IO/APIC uses lazy disabling. So the line stateis unmasked which means that enable_irq() does not call into the new irqchip to unmask it.In principle this is a shortcoming of the core code, but it's more thanunclear whether the core code should try to reset state. At least thiscannot be done unconditionally as that would break other existing use caseswhere the chip type is changed, e.g. when changing the trigger type, butthe callers expect the state to be preserved.As the way how check_timer() is switching the delivery modes is trulyunique, the obvious fix is to simply unmask the i8259 manually afterchanging the mode to ExtINT delivery and switching the irq chip to thelegacy PIC.Note, that the fixes tag is not really precise, but identifies the commitwhich broke the assumptions in the IO/APIC and i8259 code and that's thekernel version to which this needs to be backported.Fixes:bf22ff4 ("genirq: Avoid unnecessary low level irq function calls")Reported-by: p_c_chan@hotmail.comReported-by: ecm4@mail.comReported-by: perdigao1@yahoo.comReported-by: matzes@users.sourceforge.netReported-by: rvelascog@gmail.comSigned-off-by: Thomas Gleixner <tglx@linutronix.de>Tested-by: p_c_chan@hotmail.comTested-by: matzes@users.sourceforge.netCc: stable@vger.kernel.orgLink:https://bugzilla.kernel.org/show_bug.cgi?id=1977691 parenta7b3474 commit86a82ae
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2243 | 2243 | | |
2244 | 2244 | | |
2245 | 2245 | | |
| 2246 | + | |
2246 | 2247 | | |
2247 | 2248 | | |
2248 | 2249 | | |
| |||
0 commit comments
Comments
(0)