Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86a82ae

Browse files
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=197769
1 parenta7b3474 commit86a82ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎arch/x86/kernel/apic/io_apic.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,7 @@ static inline void __init check_timer(void)
22432243
legacy_pic->init(0);
22442244
legacy_pic->make_irq(0);
22452245
apic_write(APIC_LVT0,APIC_DM_EXTINT);
2246+
legacy_pic->unmask(0);
22462247

22472248
unlock_ExtINT_logic();
22482249

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp