Deleted Added
full compact
4c4
< * $Revision: 1.53 $
---
> * $Revision: 1.68 $
12c12
< * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
---
> * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
152c152
< ACPI_FUNCTION_TRACE ("EvSetGpeType");
---
> ACPI_FUNCTION_TRACE (EvSetGpeType);
203c203
< ACPI_FUNCTION_TRACE ("EvUpdateGpeEnableMasks");
---
> ACPI_FUNCTION_TRACE (EvUpdateGpeEnableMasks);
211c211,212
< RegisterBit = GpeEventInfo->RegisterBit;
---
> RegisterBit = (UINT8)
> (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber));
271c272
< ACPI_FUNCTION_TRACE ("EvEnableGpe");
---
> ACPI_FUNCTION_TRACE (EvEnableGpe);
344c345
< ACPI_FUNCTION_TRACE ("EvDisableGpe");
---
> ACPI_FUNCTION_TRACE (EvDisableGpe);
491c492
< ACPI_NATIVE_UINT Flags;
---
> ACPI_CPU_FLAGS Flags;
496c497
< ACPI_FUNCTION_NAME ("EvGpeDetect");
---
> ACPI_FUNCTION_NAME (EvGpeDetect);
504a506,512
> /*
> * We need to obtain the GPE lock for both the data structs and registers
> * Note: Not necessary to obtain the hardware lock, since the GPE registers
> * are owned by the GpeLock.
> */
> Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
>
507d514
< Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
560c567
< if (EnabledStatusByte & AcpiGbl_DecodeTo8bit[j])
---
> if (EnabledStatusByte & (1 << j))
591,593c598,600
< * DESCRIPTION: Perform the actual execution of a GPE control method. This
< * function is called from an invocation of AcpiOsQueueForExecution
< * (and therefore does NOT execute at interrupt level) so that
---
> * DESCRIPTION: Perform the actual execution of a GPE control method. This
> * function is called from an invocation of AcpiOsExecute and
> * therefore does NOT execute at interrupt level - so that
604d610
< UINT32 GpeNumber = 0;
607c613
< ACPI_PARAMETER_INFO Info;
---
> ACPI_EVALUATE_INFO *Info;
610c616
< ACPI_FUNCTION_TRACE ("EvAsynchExecuteGpeMethod");
---
> ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
651,657c657
< /*
< * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
< * control method that corresponds to this GPE
< */
< Info.Node = LocalGpeEventInfo.Dispatch.MethodNode;
< Info.Parameters = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT *, GpeEventInfo);
< Info.ParameterType = ACPI_PARAM_GPE;
---
> /* Allocate the evaluation information block */
659c659,678
< Status = AcpiNsEvaluateByHandle (&Info);
---
> Info = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
> if (!Info)
> {
> Status = AE_NO_MEMORY;
> }
> else
> {
> /*
> * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
> * control method that corresponds to this GPE
> */
> Info->PrefixNode = LocalGpeEventInfo.Dispatch.MethodNode;
> Info->Parameters = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT *, GpeEventInfo);
> Info->ParameterType = ACPI_PARAM_GPE;
> Info->Flags = ACPI_IGNORE_RETURN_VALUE;
>
> Status = AcpiNsEvaluate (Info);
> ACPI_FREE (Info);
> }
>
662,666c681,683
< ACPI_REPORT_ERROR ((
< "%s while evaluating method [%4.4s] for GPE[%2X]\n",
< AcpiFormatException (Status),
< AcpiUtGetNodeName (LocalGpeEventInfo.Dispatch.MethodNode),
< GpeNumber));
---
> ACPI_EXCEPTION ((AE_INFO, Status,
> "while evaluating GPE method [%4.4s]",
> AcpiUtGetNodeName (LocalGpeEventInfo.Dispatch.MethodNode)));
715c732
< ACPI_FUNCTION_TRACE ("EvGpeDispatch");
---
> ACPI_FUNCTION_TRACE (EvGpeDispatch);
717a735,736
> AcpiGpeCount++;
>
728,730c747,748
< ACPI_REPORT_ERROR ((
< "AcpiEvGpeDispatch: %s, Unable to clear GPE[%2X]\n",
< AcpiFormatException (Status), GpeNumber));
---
> ACPI_EXCEPTION ((AE_INFO, Status,
> "Unable to clear GPE[%2X]", GpeNumber));
735,737c753
< /* Save current system state */
<
< if (AcpiGbl_SystemAwakeAndRunning)
---
> if (!AcpiGbl_SystemAwakeAndRunning)
739c755,762
< ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
---
> /*
> * We just woke up because of a wake GPE. Disable any further GPEs
> * until we are fully up and running (Only wake GPEs should be enabled
> * at this time, but we just brute-force disable them all.)
> * 1) We must disable this particular wake GPE so it won't fire again
> * 2) We want to disable all wake GPEs, since we are now awake
> */
> (void) AcpiHwDisableAllGpes ();
741,744d763
< else
< {
< ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
< }
747,751c766,770
< * Dispatch the GPE to either an installed handler, or the control
< * method associated with this GPE (_Lxx or _Exx).
< * If a handler exists, we invoke it and do not attempt to run the method.
< * If there is neither a handler nor a method, we disable the level to
< * prevent further events from coming in here.
---
> * Dispatch the GPE to either an installed handler, or the control method
> * associated with this GPE (_Lxx or _Exx). If a handler exists, we invoke
> * it and do not attempt to run the method. If there is neither a handler
> * nor a method, we disable this GPE to prevent further such pointless
> * events from firing.
772,774c791,792
< ACPI_REPORT_ERROR ((
< "AcpiEvGpeDispatch: %s, Unable to clear GPE[%2X]\n",
< AcpiFormatException (Status), GpeNumber));
---
> ACPI_EXCEPTION ((AE_INFO, Status,
> "Unable to clear GPE[%2X]", GpeNumber));
783,784c801,802
< * Disable GPE, so it doesn't keep firing before the method has a
< * chance to run.
---
> * Disable the GPE, so it doesn't keep firing before the method has a
> * chance to run (it runs asynchronously with interrupts enabled).
789,791c807,808
< ACPI_REPORT_ERROR ((
< "AcpiEvGpeDispatch: %s, Unable to disable GPE[%2X]\n",
< AcpiFormatException (Status), GpeNumber));
---
> ACPI_EXCEPTION ((AE_INFO, Status,
> "Unable to disable GPE[%2X]", GpeNumber));
799c816
< Status = AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
---
> Status = AcpiOsExecute (OSL_GPE_HANDLER,
803,805c820,822
< ACPI_REPORT_ERROR ((
< "AcpiEvGpeDispatch: %s, Unable to queue handler for GPE[%2X] - event disabled\n",
< AcpiFormatException (Status), GpeNumber));
---
> ACPI_EXCEPTION ((AE_INFO, Status,
> "Unable to queue handler for GPE[%2X] - event disabled",
> GpeNumber));
813,814c830,831
< ACPI_REPORT_ERROR ((
< "AcpiEvGpeDispatch: No handler or method for GPE[%2X], disabling event\n",
---
> ACPI_ERROR ((AE_INFO,
> "No handler or method for GPE[%2X], disabling event",
818c835
< * Disable the GPE. The GPE will remain disabled until the ACPI
---
> * Disable the GPE. The GPE will remain disabled until the ACPI
824,826c841,842
< ACPI_REPORT_ERROR ((
< "AcpiEvGpeDispatch: %s, Unable to disable GPE[%2X]\n",
< AcpiFormatException (Status), GpeNumber));
---
> ACPI_EXCEPTION ((AE_INFO, Status,
> "Unable to disable GPE[%2X]", GpeNumber));
835,886d850
<
< #ifdef ACPI_GPE_NOTIFY_CHECK
< /*******************************************************************************
< * TBD: NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED
< *
< * FUNCTION: AcpiEvCheckForWakeOnlyGpe
< *
< * PARAMETERS: GpeEventInfo - info for this GPE
< *
< * RETURN: Status
< *
< * DESCRIPTION: Determine if a a GPE is "wake-only".
< *
< * Called from Notify() code in interpreter when a "DeviceWake"
< * Notify comes in.
< *
< ******************************************************************************/
<
< ACPI_STATUS
< AcpiEvCheckForWakeOnlyGpe (
< ACPI_GPE_EVENT_INFO *GpeEventInfo)
< {
< ACPI_STATUS Status;
<
<
< ACPI_FUNCTION_TRACE ("EvCheckForWakeOnlyGpe");
<
<
< if ((GpeEventInfo) && /* Only >0 for _Lxx/_Exx */
< ((GpeEventInfo->Flags & ACPI_GPE_SYSTEM_MASK) == ACPI_GPE_SYSTEM_RUNNING)) /* System state at GPE time */
< {
< /* This must be a wake-only GPE, disable it */
<
< Status = AcpiEvDisableGpe (GpeEventInfo);
<
< /* Set GPE to wake-only. Do not change wake disabled/enabled status */
<
< AcpiEvSetGpeType (GpeEventInfo, ACPI_GPE_TYPE_WAKE);
<
< ACPI_REPORT_INFO (("GPE %p was updated from wake/run to wake-only\n",
< GpeEventInfo));
<
< /* This was a wake-only GPE */
<
< return_ACPI_STATUS (AE_WAKE_ONLY_GPE);
< }
<
< return_ACPI_STATUS (AE_OK);
< }
< #endif
<
<