Bug 1390

Summary: eisa_set_level_irq() called by acpi_bus_init()
Product: ACPI Reporter: Len Brown (lenb)
Component: Config-InterruptsAssignee: Len Brown (lenb)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.4.23 Subsystem:
Regression: --- Bisected commit-id:

Description Len Brown 2003-10-20 12:24:03 UTC
On X86 in PIC mode, acpi_bus_init() calls eisa_set_level_irq() to put the PIC 
into level triggered mode on the SCI.  Issues with this: 
 
1. kernel build fails if CONFIG_ACPI && !CONFIG_PCI 
    eisa_set_level_irq() is in PCI specific code, even though it is PIC specific, 
    not PCI specific. 
2. may not be correct to always set SCI to level sensitive. 
    Although the ACPI spec says that the ACPI interrupt should be level triggered, 
    that may not be the case in practice.  Indeed, with the ACPI interrupt in APIC 
    mode we've found many exceptions. 
 
    If the MB sends a pulse for the SCI and we set the PIC to level triggered, 
    then we may get spurious IRQ7, or no ACPI interrupt at all. 
 
I believe the fix for this problem is to copy this PIC specific function into an X86 specific 
ACPI file, and modify it to add a warning when it actually changes the trigger mode 
from edge to level.  If we see that warning and later see SCI not working or IRQ7 spurious 
interrupts, then we know we need to remove this call.  On the other hand, if we see this 
warning and the SCI is working, then we know that we need this call for those MB's whose 
BIOS incorrectly sets the SCI trigger mode.
Comment 2 Len Brown 2003-11-30 21:15:52 UTC
in 2.4.23: 
 
        acpi_pic_sci=   [HW,ACPI] ACPI System Conrol Interrupt trigger mode 
                level   Force PIC-mode SCI to Level Trigger (default) 
                edge    Force PIC-mode SCI to Edge Trigger