summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/parser/psxface.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
committerjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
commitdba8c0a565199df70a86f6a036d00c92f0c7675f (patch)
treecf4924274c6e92898c01efb3c8ba31b34f0630f2 /sys/contrib/dev/acpica/components/parser/psxface.c
parent0f41551ef9dde560d9d191d7190af02904dbf611 (diff)
downloadFreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.zip
FreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.tar.gz
MFC: r284583, r285797, r285799, r287168, r298714, r298720, r298838,
r300879 Merge ACPICA up to 20160527. Requested by: mav
Diffstat (limited to 'sys/contrib/dev/acpica/components/parser/psxface.c')
-rw-r--r--sys/contrib/dev/acpica/components/parser/psxface.c156
1 files changed, 14 insertions, 142 deletions
diff --git a/sys/contrib/dev/acpica/components/parser/psxface.c b/sys/contrib/dev/acpica/components/parser/psxface.c
index 2927f4c..b99cee0 100644
--- a/sys/contrib/dev/acpica/components/parser/psxface.c
+++ b/sys/contrib/dev/acpica/components/parser/psxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,7 @@
#include <contrib/dev/acpica/include/acdispat.h>
#include <contrib/dev/acpica/include/acinterp.h>
#include <contrib/dev/acpica/include/actables.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
#define _COMPONENT ACPI_PARSER
@@ -55,14 +56,6 @@
/* Local Prototypes */
static void
-AcpiPsStartTrace (
- ACPI_EVALUATE_INFO *Info);
-
-static void
-AcpiPsStopTrace (
- ACPI_EVALUATE_INFO *Info);
-
-static void
AcpiPsUpdateParameterList (
ACPI_EVALUATE_INFO *Info,
UINT16 Action);
@@ -86,7 +79,7 @@ AcpiPsUpdateParameterList (
ACPI_STATUS
AcpiDebugTrace (
- char *Name,
+ const char *Name,
UINT32 DebugLevel,
UINT32 DebugLayer,
UINT32 Flags)
@@ -100,128 +93,14 @@ AcpiDebugTrace (
return (Status);
}
- /* TBDs: Validate name, allow full path or just nameseg */
-
- AcpiGbl_TraceMethodName = *ACPI_CAST_PTR (UINT32, Name);
+ AcpiGbl_TraceMethodName = Name;
AcpiGbl_TraceFlags = Flags;
-
- if (DebugLevel)
- {
- AcpiGbl_TraceDbgLevel = DebugLevel;
- }
- if (DebugLayer)
- {
- AcpiGbl_TraceDbgLayer = DebugLayer;
- }
+ AcpiGbl_TraceDbgLevel = DebugLevel;
+ AcpiGbl_TraceDbgLayer = DebugLayer;
+ Status = AE_OK;
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiPsStartTrace
- *
- * PARAMETERS: Info - Method info struct
- *
- * RETURN: None
- *
- * DESCRIPTION: Start control method execution trace
- *
- ******************************************************************************/
-
-static void
-AcpiPsStartTrace (
- ACPI_EVALUATE_INFO *Info)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- if ((!AcpiGbl_TraceMethodName) ||
- (AcpiGbl_TraceMethodName != Info->Node->Name.Integer))
- {
- goto Exit;
- }
-
- AcpiGbl_OriginalDbgLevel = AcpiDbgLevel;
- AcpiGbl_OriginalDbgLayer = AcpiDbgLayer;
-
- AcpiDbgLevel = 0x00FFFFFF;
- AcpiDbgLayer = ACPI_UINT32_MAX;
-
- if (AcpiGbl_TraceDbgLevel)
- {
- AcpiDbgLevel = AcpiGbl_TraceDbgLevel;
- }
- if (AcpiGbl_TraceDbgLayer)
- {
- AcpiDbgLayer = AcpiGbl_TraceDbgLayer;
- }
-
-
-Exit:
- (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiPsStopTrace
- *
- * PARAMETERS: Info - Method info struct
- *
- * RETURN: None
- *
- * DESCRIPTION: Stop control method execution trace
- *
- ******************************************************************************/
-
-static void
-AcpiPsStopTrace (
- ACPI_EVALUATE_INFO *Info)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
-
- if ((!AcpiGbl_TraceMethodName) ||
- (AcpiGbl_TraceMethodName != Info->Node->Name.Integer))
- {
- goto Exit;
- }
-
- /* Disable further tracing if type is one-shot */
-
- if (AcpiGbl_TraceFlags & 1)
- {
- AcpiGbl_TraceMethodName = 0;
- AcpiGbl_TraceDbgLevel = 0;
- AcpiGbl_TraceDbgLayer = 0;
- }
-
- AcpiDbgLevel = AcpiGbl_OriginalDbgLevel;
- AcpiDbgLayer = AcpiGbl_OriginalDbgLayer;
-
-Exit:
- (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+ return (Status);
}
@@ -284,10 +163,6 @@ AcpiPsExecuteMethod (
*/
AcpiPsUpdateParameterList (Info, REF_INCREMENT);
- /* Begin tracing if requested */
-
- AcpiPsStartTrace (Info);
-
/*
* Execute the method. Performs parse simultaneously
*/
@@ -297,7 +172,7 @@ AcpiPsExecuteMethod (
/* Create and init a Root Node */
- Op = AcpiPsCreateScopeOp ();
+ Op = AcpiPsCreateScopeOp (Info->ObjDesc->Method.AmlStart);
if (!Op)
{
Status = AE_NO_MEMORY;
@@ -308,7 +183,7 @@ AcpiPsExecuteMethod (
Info->PassNumber = ACPI_IMODE_EXECUTE;
WalkState = AcpiDsCreateWalkState (
- Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
+ Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
if (!WalkState)
{
Status = AE_NO_MEMORY;
@@ -316,8 +191,8 @@ AcpiPsExecuteMethod (
}
Status = AcpiDsInitAmlWalk (WalkState, Op, Info->Node,
- Info->ObjDesc->Method.AmlStart,
- Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
+ Info->ObjDesc->Method.AmlStart,
+ Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -370,10 +245,6 @@ AcpiPsExecuteMethod (
Cleanup:
AcpiPsDeleteParseTree (Op);
- /* End optional tracing */
-
- AcpiPsStopTrace (Info);
-
/* Take away the extra reference that we gave the parameters above */
AcpiPsUpdateParameterList (Info, REF_DECREMENT);
@@ -432,7 +303,8 @@ AcpiPsUpdateParameterList (
{
/* Ignore errors, just do them all */
- (void) AcpiUtUpdateObjectReference (Info->Parameters[i], Action);
+ (void) AcpiUtUpdateObjectReference (
+ Info->Parameters[i], Action);
}
}
}
OpenPOWER on IntegriCloud