mirror of
https://github.com/acpica/acpica/
synced 2025-02-24 17:34:43 +03:00
remove legacy module-level code due to deprecation
There have been several places that has been calling functions regarding module level code blocks. This change removes all old vestiges in the codebase. This is dead code. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
This commit is contained in:
parent
316dc10d9a
commit
1ca34b1a7b
@ -166,12 +166,6 @@
|
|||||||
* Things like Events, Global Lock, etc. are not used
|
* Things like Events, Global Lock, etc. are not used
|
||||||
* by the compiler, so they are stubbed out here.
|
* by the compiler, so they are stubbed out here.
|
||||||
*/
|
*/
|
||||||
void
|
|
||||||
AcpiNsExecModuleCodeList (
|
|
||||||
void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ACPI_STATUS
|
ACPI_STATUS
|
||||||
AcpiNsInitializeObjects (
|
AcpiNsInitializeObjects (
|
||||||
void)
|
void)
|
||||||
|
@ -160,13 +160,6 @@
|
|||||||
#define _COMPONENT ACPI_NAMESPACE
|
#define _COMPONENT ACPI_NAMESPACE
|
||||||
ACPI_MODULE_NAME ("nseval")
|
ACPI_MODULE_NAME ("nseval")
|
||||||
|
|
||||||
/* Local prototypes */
|
|
||||||
|
|
||||||
static void
|
|
||||||
AcpiNsExecModuleCode (
|
|
||||||
ACPI_OPERAND_OBJECT *MethodObj,
|
|
||||||
ACPI_EVALUATE_INFO *Info);
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
@ -465,206 +458,3 @@ Cleanup:
|
|||||||
Info->FullPathname = NULL;
|
Info->FullPathname = NULL;
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: AcpiNsExecModuleCodeList
|
|
||||||
*
|
|
||||||
* PARAMETERS: None
|
|
||||||
*
|
|
||||||
* RETURN: None. Exceptions during method execution are ignored, since
|
|
||||||
* we cannot abort a table load.
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Execute all elements of the global module-level code list.
|
|
||||||
* Each element is executed as a single control method.
|
|
||||||
*
|
|
||||||
* NOTE: With this option enabled, each block of detected executable AML
|
|
||||||
* code that is outside of any control method is wrapped with a temporary
|
|
||||||
* control method object and placed on a global list. The methods on this
|
|
||||||
* list are executed below.
|
|
||||||
*
|
|
||||||
* This function executes the module-level code for all tables only after
|
|
||||||
* all of the tables have been loaded. It is a legacy option and is
|
|
||||||
* not compatible with other ACPI implementations. See AcpiNsLoadTable.
|
|
||||||
*
|
|
||||||
* This function will be removed when the legacy option is removed.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
AcpiNsExecModuleCodeList (
|
|
||||||
void)
|
|
||||||
{
|
|
||||||
ACPI_OPERAND_OBJECT *Prev;
|
|
||||||
ACPI_OPERAND_OBJECT *Next;
|
|
||||||
ACPI_EVALUATE_INFO *Info;
|
|
||||||
UINT32 MethodCount = 0;
|
|
||||||
|
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE (NsExecModuleCodeList);
|
|
||||||
|
|
||||||
|
|
||||||
/* Exit now if the list is empty */
|
|
||||||
|
|
||||||
Next = AcpiGbl_ModuleCodeList;
|
|
||||||
if (!Next)
|
|
||||||
{
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES,
|
|
||||||
"Legacy MLC block list is empty\n"));
|
|
||||||
|
|
||||||
return_VOID;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate the evaluation information block */
|
|
||||||
|
|
||||||
Info = ACPI_ALLOCATE (sizeof (ACPI_EVALUATE_INFO));
|
|
||||||
if (!Info)
|
|
||||||
{
|
|
||||||
return_VOID;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Walk the list, executing each "method" */
|
|
||||||
|
|
||||||
while (Next)
|
|
||||||
{
|
|
||||||
Prev = Next;
|
|
||||||
Next = Next->Method.Mutex;
|
|
||||||
|
|
||||||
/* Clear the link field and execute the method */
|
|
||||||
|
|
||||||
Prev->Method.Mutex = NULL;
|
|
||||||
AcpiNsExecModuleCode (Prev, Info);
|
|
||||||
MethodCount++;
|
|
||||||
|
|
||||||
/* Delete the (temporary) method object */
|
|
||||||
|
|
||||||
AcpiUtRemoveReference (Prev);
|
|
||||||
}
|
|
||||||
|
|
||||||
ACPI_INFO ((
|
|
||||||
"Executed %u blocks of module-level executable AML code",
|
|
||||||
MethodCount));
|
|
||||||
|
|
||||||
ACPI_FREE (Info);
|
|
||||||
AcpiGbl_ModuleCodeList = NULL;
|
|
||||||
return_VOID;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: AcpiNsExecModuleCode
|
|
||||||
*
|
|
||||||
* PARAMETERS: MethodObj - Object container for the module-level code
|
|
||||||
* Info - Info block for method evaluation
|
|
||||||
*
|
|
||||||
* RETURN: None. Exceptions during method execution are ignored, since
|
|
||||||
* we cannot abort a table load.
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Execute a control method containing a block of module-level
|
|
||||||
* executable AML code. The control method is temporarily
|
|
||||||
* installed to the root node, then evaluated.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static void
|
|
||||||
AcpiNsExecModuleCode (
|
|
||||||
ACPI_OPERAND_OBJECT *MethodObj,
|
|
||||||
ACPI_EVALUATE_INFO *Info)
|
|
||||||
{
|
|
||||||
ACPI_OPERAND_OBJECT *ParentObj;
|
|
||||||
ACPI_NAMESPACE_NODE *ParentNode;
|
|
||||||
ACPI_OBJECT_TYPE Type;
|
|
||||||
ACPI_STATUS Status;
|
|
||||||
|
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE (NsExecModuleCode);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the parent node. We cheat by using the NextObject field
|
|
||||||
* of the method object descriptor.
|
|
||||||
*/
|
|
||||||
ParentNode = ACPI_CAST_PTR (
|
|
||||||
ACPI_NAMESPACE_NODE, MethodObj->Method.NextObject);
|
|
||||||
Type = AcpiNsGetType (ParentNode);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the region handler and save it in the method object. We may need
|
|
||||||
* this if an operation region declaration causes a _REG method to be run.
|
|
||||||
*
|
|
||||||
* We can't do this in AcpiPsLinkModuleCode because
|
|
||||||
* AcpiGbl_RootNode->Object is NULL at PASS1.
|
|
||||||
*/
|
|
||||||
if ((Type == ACPI_TYPE_DEVICE) && ParentNode->Object)
|
|
||||||
{
|
|
||||||
MethodObj->Method.Dispatch.Handler =
|
|
||||||
ParentNode->Object->Device.Handler;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Must clear NextObject (AcpiNsAttachObject needs the field) */
|
|
||||||
|
|
||||||
MethodObj->Method.NextObject = NULL;
|
|
||||||
|
|
||||||
/* Initialize the evaluation information block */
|
|
||||||
|
|
||||||
memset (Info, 0, sizeof (ACPI_EVALUATE_INFO));
|
|
||||||
Info->PrefixNode = ParentNode;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the currently attached parent object. Add a reference,
|
|
||||||
* because the ref count will be decreased when the method object
|
|
||||||
* is installed to the parent node.
|
|
||||||
*/
|
|
||||||
ParentObj = AcpiNsGetAttachedObject (ParentNode);
|
|
||||||
if (ParentObj)
|
|
||||||
{
|
|
||||||
AcpiUtAddReference (ParentObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Install the method (module-level code) in the parent node */
|
|
||||||
|
|
||||||
Status = AcpiNsAttachObject (ParentNode, MethodObj, ACPI_TYPE_METHOD);
|
|
||||||
if (ACPI_FAILURE (Status))
|
|
||||||
{
|
|
||||||
goto Exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Execute the parent node as a control method */
|
|
||||||
|
|
||||||
Status = AcpiNsEvaluate (Info);
|
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES,
|
|
||||||
"Executed module-level code at %p\n",
|
|
||||||
MethodObj->Method.AmlStart));
|
|
||||||
|
|
||||||
/* Delete a possible implicit return value (in slack mode) */
|
|
||||||
|
|
||||||
if (Info->ReturnObject)
|
|
||||||
{
|
|
||||||
AcpiUtRemoveReference (Info->ReturnObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Detach the temporary method object */
|
|
||||||
|
|
||||||
AcpiNsDetachObject (ParentNode);
|
|
||||||
|
|
||||||
/* Restore the original parent object */
|
|
||||||
|
|
||||||
if (ParentObj)
|
|
||||||
{
|
|
||||||
Status = AcpiNsAttachObject (ParentNode, ParentObj, Type);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ParentNode->Type = (UINT8) Type;
|
|
||||||
}
|
|
||||||
|
|
||||||
Exit:
|
|
||||||
if (ParentObj)
|
|
||||||
{
|
|
||||||
AcpiUtRemoveReference (ParentObj);
|
|
||||||
}
|
|
||||||
return_VOID;
|
|
||||||
}
|
|
||||||
|
@ -268,18 +268,6 @@ Unlock:
|
|||||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||||
"**** Completed Table Object Initialization\n"));
|
"**** Completed Table Object Initialization\n"));
|
||||||
|
|
||||||
/*
|
|
||||||
* This case handles the legacy option that groups all module-level
|
|
||||||
* code blocks together and defers execution until all of the tables
|
|
||||||
* are loaded. Execute all of these blocks at this time.
|
|
||||||
* Execute any module-level code that was detected during the table
|
|
||||||
* load phase.
|
|
||||||
*
|
|
||||||
* Note: this option is deprecated and will be eliminated in the
|
|
||||||
* future. Use of this option can cause problems with AML code that
|
|
||||||
* depends upon in-order immediate execution of module-level code.
|
|
||||||
*/
|
|
||||||
AcpiNsExecModuleCodeList ();
|
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -802,24 +802,11 @@ AcpiNsTerminate (
|
|||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
ACPI_STATUS Status;
|
ACPI_STATUS Status;
|
||||||
ACPI_OPERAND_OBJECT *Prev;
|
|
||||||
ACPI_OPERAND_OBJECT *Next;
|
|
||||||
|
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE (NsTerminate);
|
ACPI_FUNCTION_TRACE (NsTerminate);
|
||||||
|
|
||||||
|
|
||||||
/* Delete any module-level code blocks */
|
|
||||||
|
|
||||||
Next = AcpiGbl_ModuleCodeList;
|
|
||||||
while (Next)
|
|
||||||
{
|
|
||||||
Prev = Next;
|
|
||||||
Next = Next->Method.Mutex;
|
|
||||||
Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */
|
|
||||||
AcpiUtRemoveReference (Prev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free the entire namespace -- all nodes and all objects
|
* Free the entire namespace -- all nodes and all objects
|
||||||
* attached to the nodes
|
* attached to the nodes
|
||||||
|
@ -1190,19 +1190,6 @@ AcpiTbLoadTable (
|
|||||||
|
|
||||||
Status = AcpiNsLoadTable (TableIndex, ParentNode);
|
Status = AcpiNsLoadTable (TableIndex, ParentNode);
|
||||||
|
|
||||||
/*
|
|
||||||
* This case handles the legacy option that groups all module-level
|
|
||||||
* code blocks together and defers execution until all of the tables
|
|
||||||
* are loaded. Execute all of these blocks at this time.
|
|
||||||
* Execute any module-level code that was detected during the table
|
|
||||||
* load phase.
|
|
||||||
*
|
|
||||||
* Note: this option is deprecated and will be eliminated in the
|
|
||||||
* future. Use of this option can cause problems with AML code that
|
|
||||||
* depends upon in-order immediate execution of module-level code.
|
|
||||||
*/
|
|
||||||
AcpiNsExecModuleCodeList ();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
|
* Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
|
||||||
* responsible for discovering any new wake GPEs by running _PRW methods
|
* responsible for discovering any new wake GPEs by running _PRW methods
|
||||||
|
@ -342,7 +342,6 @@ AcpiUtInitGlobals (
|
|||||||
|
|
||||||
/* Namespace */
|
/* Namespace */
|
||||||
|
|
||||||
AcpiGbl_ModuleCodeList = NULL;
|
|
||||||
AcpiGbl_RootNode = NULL;
|
AcpiGbl_RootNode = NULL;
|
||||||
AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
|
AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
|
||||||
AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
|
AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
|
||||||
|
@ -381,19 +381,6 @@ AcpiInitializeObjects (
|
|||||||
ACPI_FUNCTION_TRACE (AcpiInitializeObjects);
|
ACPI_FUNCTION_TRACE (AcpiInitializeObjects);
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This case handles the legacy option that groups all module-level
|
|
||||||
* code blocks together and defers execution until all of the tables
|
|
||||||
* are loaded. Execute all of these blocks at this time.
|
|
||||||
* Execute any module-level code that was detected during the table
|
|
||||||
* load phase.
|
|
||||||
*
|
|
||||||
* Note: this option is deprecated and will be eliminated in the
|
|
||||||
* future. Use of this option can cause problems with AML code that
|
|
||||||
* depends upon in-order immediate execution of module-level code.
|
|
||||||
*/
|
|
||||||
AcpiNsExecModuleCodeList ();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the objects that remain uninitialized. This
|
* Initialize the objects that remain uninitialized. This
|
||||||
* runs the executable AML that may be part of the
|
* runs the executable AML that may be part of the
|
||||||
|
@ -323,7 +323,6 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_VerboseLeakDump);
|
|||||||
ACPI_GLOBAL (ACPI_NAMESPACE_NODE, AcpiGbl_RootNodeStruct);
|
ACPI_GLOBAL (ACPI_NAMESPACE_NODE, AcpiGbl_RootNodeStruct);
|
||||||
ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_RootNode);
|
ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_RootNode);
|
||||||
ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_FadtGpeDevice);
|
ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_FadtGpeDevice);
|
||||||
ACPI_GLOBAL (ACPI_OPERAND_OBJECT *, AcpiGbl_ModuleCodeList);
|
|
||||||
|
|
||||||
extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
|
extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
|
||||||
extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
|
extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
|
||||||
|
@ -419,10 +419,6 @@ ACPI_STATUS
|
|||||||
AcpiNsEvaluate (
|
AcpiNsEvaluate (
|
||||||
ACPI_EVALUATE_INFO *Info);
|
ACPI_EVALUATE_INFO *Info);
|
||||||
|
|
||||||
void
|
|
||||||
AcpiNsExecModuleCodeList (
|
|
||||||
void);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nsarguments - Argument count/type checking for predefined/reserved names
|
* nsarguments - Argument count/type checking for predefined/reserved names
|
||||||
|
@ -301,13 +301,6 @@ AcpiNsEvaluate (
|
|||||||
return (AE_NOT_IMPLEMENTED);
|
return (AE_NOT_IMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
AcpiNsExecModuleCodeList (
|
|
||||||
void)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AcpiExDoDebugObject (
|
AcpiExDoDebugObject (
|
||||||
ACPI_OPERAND_OBJECT *SourceDesc,
|
ACPI_OPERAND_OBJECT *SourceDesc,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user