static UINT32 ACPI_SYSTEM_XFACE AcpiEvSciXruptHandler ( void *Context) { ACPI_GPE_XRUPT_INFO *GpeXruptList = Context; UINT32 InterruptHandled = ACPI_INTERRUPT_NOT_HANDLED; ACPI_FUNCTION_TRACE (EvSciXruptHandler); /* * We are guaranteed by the ACPICA initialization/shutdown code that * if this interrupt handler is installed, ACPI is enabled. */ /* * Fixed Events: * Check for and dispatch any Fixed Events that have occurred */ InterruptHandled |= AcpiEvFixedEventDetect (); /* * General Purpose Events: * Check for and dispatch any GPEs that have occurred */ InterruptHandled |= AcpiEvGpeDetect (GpeXruptList); /* Invoke all host-installed SCI handlers */ InterruptHandled |= AcpiEvSciDispatch (); AcpiSciCount++; return_UINT32 (InterruptHandled); }
UINT32 ACPI_SYSTEM_XFACE AcpiEvGpeXruptHandler ( void *Context) { ACPI_GPE_XRUPT_INFO *GpeXruptList = Context; UINT32 InterruptHandled = ACPI_INTERRUPT_NOT_HANDLED; ACPI_FUNCTION_TRACE (EvGpeXruptHandler); /* * We are guaranteed by the ACPICA initialization/shutdown code that * if this interrupt handler is installed, ACPI is enabled. */ /* GPEs: Check for and dispatch any GPEs that have occurred */ InterruptHandled |= AcpiEvGpeDetect (GpeXruptList); return_UINT32 (InterruptHandled); }
ACPI_STATUS AcpiUpdateAllGpes ( void) { ACPI_STATUS Status; BOOLEAN IsPollingNeeded = FALSE; ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes); Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } if (AcpiGbl_AllGpesInitialized) { goto UnlockAndExit; } Status = AcpiEvWalkGpeList (AcpiEvInitializeGpeBlock, &IsPollingNeeded); if (ACPI_SUCCESS (Status)) { AcpiGbl_AllGpesInitialized = TRUE; } UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS); if (IsPollingNeeded && AcpiGbl_AllGpesInitialized) { /* Poll GPEs to handle already triggered events */ AcpiEvGpeDetect (AcpiGbl_GpeXruptListHead); } return_ACPI_STATUS (Status); }