diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2025-01-03 21:53:44 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2025-01-03 21:53:44 +0000 |
| commit | 98a2c01a889887800ea689bbbed0c3c240712fc5 (patch) | |
| tree | e75c78caccfdacc1a95e9767dafcf86123347052 /source/components | |
| parent | ae8106ed3aecee3e160f5b0a67b3cf0b500b3723 (diff) | |
Diffstat (limited to 'source/components')
| -rw-r--r-- | source/components/dispatcher/dsutils.c | 9 | ||||
| -rw-r--r-- | source/components/events/evxfregn.c | 1 | ||||
| -rw-r--r-- | source/components/parser/psobject.c | 44 |
3 files changed, 24 insertions, 30 deletions
diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index cc1d2b1f1e0f..f006d4325cb3 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -867,6 +867,8 @@ AcpiDsCreateOperands ( ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS]; UINT32 ArgCount = 0; UINT32 Index = WalkState->NumOperands; + UINT32 PrevNumOperands = WalkState->NumOperands; + UINT32 NewNumOperands; UINT32 i; @@ -899,6 +901,7 @@ AcpiDsCreateOperands ( /* Create the interpreter arguments, in reverse order */ + NewNumOperands = Index; Index--; for (i = 0; i < ArgCount; i++) { @@ -926,7 +929,11 @@ Cleanup: * pop everything off of the operand stack and delete those * objects */ - AcpiDsObjStackPopAndDelete (ArgCount, WalkState); + WalkState->NumOperands = (UINT8) (i); + AcpiDsObjStackPopAndDelete (NewNumOperands, WalkState); + + /* Restore operand count */ + WalkState->NumOperands = (UINT8) (PrevNumOperands); ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %u", Index)); return_ACPI_STATUS (Status); diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c index 01643619d73d..30cecb7c7da9 100644 --- a/source/components/events/evxfregn.c +++ b/source/components/events/evxfregn.c @@ -392,7 +392,6 @@ AcpiRemoveAddressSpaceHandler ( /* Now we can delete the handler object */ - AcpiOsReleaseMutex (HandlerObj->AddressSpace.ContextMutex); AcpiUtRemoveReference (HandlerObj); goto UnlockAndExit; } diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index 40a6991209fb..d02dcbe2815f 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -815,7 +815,8 @@ AcpiPsCompleteFinalOp ( ACPI_PARSE_OBJECT *Op, ACPI_STATUS Status) { - ACPI_STATUS Status2; + ACPI_STATUS ReturnStatus = Status; + BOOLEAN Ascending = TRUE; ACPI_FUNCTION_TRACE_PTR (PsCompleteFinalOp, WalkState); @@ -832,7 +833,7 @@ AcpiPsCompleteFinalOp ( { if (Op) { - if (WalkState->AscendingCallback != NULL) + if (Ascending && WalkState->AscendingCallback != NULL) { WalkState->Op = Op; WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); @@ -851,41 +852,28 @@ AcpiPsCompleteFinalOp ( if (Status == AE_CTRL_TERMINATE) { - Status = AE_OK; - - /* Clean up */ - do - { - if (Op) - { - Status2 = AcpiPsCompleteThisOp (WalkState, Op); - if (ACPI_FAILURE (Status2)) - { - return_ACPI_STATUS (Status2); - } - } - - AcpiPsPopScope (&(WalkState->ParserState), &Op, - &WalkState->ArgTypes, &WalkState->ArgCount); - - } while (Op); - - return_ACPI_STATUS (Status); + Ascending = FALSE; + ReturnStatus = AE_CTRL_TERMINATE; } else if (ACPI_FAILURE (Status)) { /* First error is most important */ - (void) AcpiPsCompleteThisOp (WalkState, Op); - return_ACPI_STATUS (Status); + Ascending = FALSE; + ReturnStatus = Status; } } - Status2 = AcpiPsCompleteThisOp (WalkState, Op); - if (ACPI_FAILURE (Status2)) + Status = AcpiPsCompleteThisOp (WalkState, Op); + if (ACPI_FAILURE (Status)) { - return_ACPI_STATUS (Status2); + Ascending = FALSE; + if (ACPI_SUCCESS (ReturnStatus) || + ReturnStatus == AE_CTRL_TERMINATE) + { + ReturnStatus = Status; + } } } @@ -894,5 +882,5 @@ AcpiPsCompleteFinalOp ( } while (Op); - return_ACPI_STATUS (Status); + return_ACPI_STATUS (ReturnStatus); } |
