Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20130927
acpica-unix2-20130823
PANKOVs restructure

*** 3,13 **** * Module Name: evgpe - General Purpose Event handling and dispatch * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: --- 3,13 ---- * Module Name: evgpe - General Purpose Event handling and dispatch * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
*** 47,56 **** --- 47,58 ---- #include "acnamesp.h" #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME ("evgpe") + #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ + /* Local prototypes */ static void ACPI_SYSTEM_XFACE AcpiEvAsynchExecuteGpeMethod ( void *Context);
*** 88,98 **** if (!GpeRegisterInfo) { return_ACPI_STATUS (AE_NOT_EXIST); } ! RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo); /* Clear the run bit up front */ ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit); --- 90,100 ---- if (!GpeRegisterInfo) { return_ACPI_STATUS (AE_NOT_EXIST); } ! RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); /* Clear the run bit up front */ ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
*** 427,436 **** --- 429,445 ---- * register, we can safely ignore the entire register. */ if (!(GpeRegisterInfo->EnableForRun | GpeRegisterInfo->EnableForWake)) { + ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, + "Ignore disabled registers for GPE%02X-GPE%02X: " + "RunEnable=%02X, WakeEnable=%02X\n", + GpeRegisterInfo->BaseGpeNumber, + GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), + GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake)); continue; } /* Read the Status Register */
*** 447,458 **** { goto UnlockAndExit; } ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, ! "Read GPE Register at GPE%02X: Status=%02X, Enable=%02X\n", ! GpeRegisterInfo->BaseGpeNumber, StatusReg, EnableReg)); /* Check if there is anything active at all in this register */ EnabledStatusByte = (UINT8) (StatusReg & EnableReg); if (!EnabledStatusByte) --- 456,472 ---- { goto UnlockAndExit; } ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, ! "Read registers for GPE%02X-GPE%02X: Status=%02X, Enable=%02X, " ! "RunEnable=%02X, WakeEnable=%02X\n", ! GpeRegisterInfo->BaseGpeNumber, ! GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), ! StatusReg, EnableReg, ! GpeRegisterInfo->EnableForRun, ! GpeRegisterInfo->EnableForWake)); /* Check if there is anything active at all in this register */ EnabledStatusByte = (UINT8) (StatusReg & EnableReg); if (!EnabledStatusByte)
*** 514,523 **** --- 528,538 ---- { ACPI_GPE_EVENT_INFO *GpeEventInfo = Context; ACPI_STATUS Status; ACPI_GPE_EVENT_INFO *LocalGpeEventInfo; ACPI_EVALUATE_INFO *Info; + ACPI_GPE_NOTIFY_INFO *Notify; ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
*** 532,549 **** --- 547,566 ---- } Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) { + ACPI_FREE (LocalGpeEventInfo); return_VOID; } /* Must revalidate the GpeNumber/GpeBlock */ if (!AcpiEvValidGpeEvent (GpeEventInfo)) { Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); + ACPI_FREE (LocalGpeEventInfo); return_VOID; } /* * Take a snapshot of the GPE info for this level - we copy the info to
*** 553,582 **** sizeof (ACPI_GPE_EVENT_INFO)); Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) { return_VOID; } /* Do the correct dispatch - normal method or implicit notify */ switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) { case ACPI_GPE_DISPATCH_NOTIFY: - /* * Implicit notify. * Dispatch a DEVICE_WAKE notify to the appropriate handler. * NOTE: the request is queued for execution after this method * completes. The notify handlers are NOT invoked synchronously * from this thread -- because handlers may in turn run other * control methods. */ ! Status = AcpiEvQueueNotifyRequest ( ! LocalGpeEventInfo->Dispatch.DeviceNode, ACPI_NOTIFY_DEVICE_WAKE); break; case ACPI_GPE_DISPATCH_METHOD: /* Allocate the evaluation information block */ --- 570,607 ---- sizeof (ACPI_GPE_EVENT_INFO)); Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) { + ACPI_FREE (LocalGpeEventInfo); return_VOID; } /* Do the correct dispatch - normal method or implicit notify */ switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) { case ACPI_GPE_DISPATCH_NOTIFY: /* * Implicit notify. * Dispatch a DEVICE_WAKE notify to the appropriate handler. * NOTE: the request is queued for execution after this method * completes. The notify handlers are NOT invoked synchronously * from this thread -- because handlers may in turn run other * control methods. + * + * June 2012: Expand implicit notify mechanism to support + * notifies on multiple device objects. */ ! Notify = LocalGpeEventInfo->Dispatch.NotifyList; ! while (ACPI_SUCCESS (Status) && Notify) ! { ! Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode, ACPI_NOTIFY_DEVICE_WAKE); + + Notify = Notify->Next; + } break; case ACPI_GPE_DISPATCH_METHOD: /* Allocate the evaluation information block */
*** 603,616 **** { ACPI_EXCEPTION ((AE_INFO, Status, "while evaluating GPE method [%4.4s]", AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode))); } - break; default: return_VOID; /* Should never happen */ } /* Defer enabling of GPE until all notify handlers are done */ --- 628,641 ---- { ACPI_EXCEPTION ((AE_INFO, Status, "while evaluating GPE method [%4.4s]", AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode))); } break; default: + return_VOID; /* Should never happen */ } /* Defer enabling of GPE until all notify handlers are done */
*** 793,803 **** } break; case ACPI_GPE_DISPATCH_METHOD: case ACPI_GPE_DISPATCH_NOTIFY: - /* * Execute the method associated with the GPE * NOTE: Level-triggered GPEs are cleared after the method completes. */ Status = AcpiOsExecute (OSL_GPE_HANDLER, --- 818,827 ----
*** 809,819 **** GpeNumber)); } break; default: - /* * No handler or method to run! * 03/2010: This case should no longer be possible. We will not allow * a GPE to be enabled if it has no handler or method. */ --- 833,842 ----
*** 824,828 **** --- 847,852 ---- } return_UINT32 (ACPI_INTERRUPT_HANDLED); } + #endif /* !ACPI_REDUCED_HARDWARE */