Bug 26696 - 2.4.x SMP kernel breaks legacy PIC interrupts 13/2
Summary: 2.4.x SMP kernel breaks legacy PIC interrupts 13/2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.1
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brock Organ
URL:
Whiteboard: Florence Gold
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-08 15:59 UTC by Richard Black
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-02-13 20:55:10 UTC
Embargoed:


Attachments (Terms of Use)
APIC IRQ13 patch (1.14 KB, patch)
2001-02-09 21:04 UTC, Richard Black
no flags Details | Diff

Description Richard Black 2001-02-08 15:59:43 UTC
Red Hat 7.1 Linux Beta - beta3
Feb 8, 2001
HW: any / Tested with DL380

2.4.x SMP kernel breaks legacy PIC interrupts 13/2

The following email describes this issue, we also have a preliminary patch 
(a one liner) to fix this:

------------------------------------------
-----Original Message-----
From: Compaq
Sent: Wednesday, February 07, 2001 1:53 PM
To: 'linux-kernel.net';
'linux-smp.net'
Subject: [BUG] 2.4.x SMP kernel breaks legacy PIC interrupts 13/2


The symptom:
Compaq leverages IRQ 13, usually used to raise a floating point exception 
on Intel pre-Pentium systems, to trigger management interrupts (i.e. on 
fan failure, etc.). This interrupt level is usually NOT shareable, but 
through some magic, we managed to register an ISR for our management 
driver on IRQ 13. In the kernel 2.2.x, this worked fine for both SMP and 
UP kernels.  On the 2.4.x SMP kernels, we do NOT get any interrupts when 
using request_irq() for IRQ 13.

Debugging:
If you boot the SMP kernel with the 'noapic' parameter, the interrupt 
works fine.
We are aware that IRQ 2 and IRQ 13 will be always routed through the 
legacy 8259A PIC as opposed to the IO-APIC.  If we change the kernel to 
route IRQ 13 through the APIC, everything works fine.  Furthermore, if we 
route any other working interrupt through the PIC, it does not work.  It 
appears to be related to putting the PIC into auto-EOI mode.  The 2.4 SMP 
kernel puts the PIC in auto-EOI mode while setting up the timer 
interrupt.  See init_8259A(1) in the check_timer routine in 
arch/i386/kernel/io_apic.c.

Conclusion:
PIC and APIC routed interrupts do not coexist peacefully in the 2.4.x SMP 
kernel.  We need to figure out why PIC interrupts don't work with the APIC 
interrupts enabled, or stop forcing IRQ 2 and 13 to the PIC when APIC 
interrupts are enabled.  As it is right now, you will never see an IRQ 2 
or 13 while in APIC mode on the 2.4.x SMP kernel, which makes the code 
carefully preserving PIC interrupts superfluous. If fixing this kernel 
flaw turns out to be too involved, at the very least, we would like to 
suggest the code forcing IRQ's 2 and 13 onto the PIC be removed from the 
2.4 kernel.
------------------------------------------

Reproducible: Yes.

Compaq Bug #: 193820

Compaq considers this defect a  MUST-FIX for Florence.

Comment 1 Glen Foster 2001-02-08 23:43:06 UTC
This defect is considered MUST-FIX for Florence Gold release

Comment 2 Arjan van de Ven 2001-02-09 09:41:49 UTC
I don't see the patch. Could you post it again ?

Comment 3 Richard Black 2001-02-09 21:04:07 UTC
Created attachment 9539 [details]
APIC IRQ13 patch

Comment 4 Arjan van de Ven 2001-02-09 21:16:36 UTC
merged; will be in next kernel build

Comment 5 Glen Foster 2001-02-09 23:18:32 UTC
This defect is considered MUST-FIX for Florence Gold release

Comment 6 Arjan van de Ven 2001-02-12 09:16:44 UTC
I will close this bug as deferred as your patch will be in the next build.

Comment 7 Michael K. Johnson 2001-02-13 20:55:00 UTC
Oops, "next build" should be RAWHIDE resolution.


Note You need to log in before you can comment on or make changes to this bug.