Bug 1299

Summary: [PATCH] Correct Stall semantics
Product: ACPI Reporter: Nate Lawson (nate)
Component: ACPICA-CoreAssignee: Robert Moore (Robert.Moore)
Status: CLOSED CODE_FIX    
Severity: low CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: ? Subsystem:
Regression: --- Bisected commit-id:

Description Nate Lawson 2003-09-30 12:36:22 UTC
Software Environment:  ACPI-CA
Problem Description:

The Stall() opcode in AML is specifically restricted to 100 microseconds max in
the spec.  Some AML vendors get Stall() and Sleep() mixed up and thus end up
with overly long Stalls.  For example,
   Stall(0x3e8)
is probably an attempt to sleep for a second.

The below patch does not attempt to fix this but does use the appropriate sleep
call in place of overly long stalls.  It also removes some redundant code.

http://www.root.org/~nate/acpi/exsystem.diff
Comment 1 Nate Lawson 2003-11-05 12:54:18 UTC
I believe Len said he would change this to Stall for up to 255 microseconds,
call Sleep otherwise.
Comment 2 Robert Moore 2003-11-14 11:45:24 UTC
Stalls up to 255 accepted by the iASL compiler and AML interpreter.  Error if 
>255, don't convert stall to a sleep.
Comment 3 Nate Lawson 2003-11-18 12:44:33 UTC
Thanks, for reference here was Bob's original email:

Subject: RE: [PATCH] Stall semantics
From: "Moore, Robert"
Date: Fri, 3 Oct 2003 13:23:29 -0700
Cc: acpi-devel@lists.sourceforge.net

Here's what the MS interpreter does for Stall(n);

1) If n <= 255 (MAX_BYTE), perform the stall.
2) If n > 255, throw an error and abort the control method.

In this case, I suggest that we simply duplicate the MS behavior, it
seems like a good compromise and also provides ACPI CA with exact
compatibility.

Bob