acpi/Osd: SCI_INT in FADT is the IRQ number on the system with 8259 (icu)
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Apr 2011 14:02:48 +0000 (22:02 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Apr 2011 14:02:48 +0000 (22:02 +0800)
MADT's interrupt source override entry, which only tells you how SCI is
wired to I/O APIC, does _not_ change SCI's IRQ number.

While I'm here, remove unused function.

sys/dev/acpica5/Osd/OsdInterrupt.c
sys/dev/acpica5/acpivar.h

index 78a76fe..f46472d 100644 (file)
@@ -48,7 +48,6 @@ ACPI_MODULE_NAME("INTERRUPT")
 static void            InterruptWrapper(void *arg);
 
 static ACPI_OSD_HANDLER        InterruptHandler;
-static UINT32          InterruptOverride = 0;
 
 ACPI_STATUS
 AcpiOsInstallInterruptHandler(UINT32 InterruptNumber,
@@ -73,17 +72,6 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber,
     }
     InterruptHandler = ServiceRoutine;
 
-    /*
-     * If the MADT contained an interrupt override directive for the SCI,
-     * we use that value instead of the one from the FADT.
-     */
-    if (InterruptOverride != 0) {
-           device_printf(sc->acpi_dev,
-               "Overriding SCI Interrupt from IRQ %u to IRQ %u\n",
-               InterruptNumber, InterruptOverride);
-           InterruptNumber = InterruptOverride;
-    }
-
     /* Set up the interrupt resource. */
     sc->acpi_irq_rid = 0;
     bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1);
@@ -142,18 +130,6 @@ AcpiOsRemoveInterruptHandler(UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRou
     return_ACPI_STATUS (AE_OK);
 }
 
-ACPI_STATUS
-acpi_OverrideInterruptLevel(UINT32 InterruptNumber)
-{
-
-    ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
-
-    if (InterruptOverride != 0)
-       return_ACPI_STATUS (AE_ALREADY_EXISTS);
-    InterruptOverride = InterruptNumber;
-    return_ACPI_STATUS (AE_OK);
-}
-
 static void
 InterruptWrapper(void *arg)
 {
index 7afffd8..353809a 100644 (file)
@@ -332,7 +332,6 @@ ACPI_STATUS acpi_FindIndexedResource(ACPI_BUFFER *buf, int index,
                    ACPI_RESOURCE **resp);
 ACPI_STATUS    acpi_AppendBufferResource(ACPI_BUFFER *buf,
                    ACPI_RESOURCE *res);
-ACPI_STATUS    acpi_OverrideInterruptLevel(UINT32 InterruptNumber);
 ACPI_STATUS    acpi_SetIntrModel(int model);
 int            acpi_ReqSleepState(struct acpi_softc *sc, int state);
 int            acpi_AckSleepState(struct apm_clone_data *clone, int error);