From owner-acpi-jp@jp.freebsd.org  Thu Dec  6 01:36:54 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id BAA60632;
	Thu, 6 Dec 2001 01:36:54 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id BAA60626;
	Thu, 6 Dec 2001 01:36:52 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (root@localhost [127.0.0.1])
	(authenticated as iwa with CRAM-MD5)
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id fB5GaoP55044;
	Thu, 6 Dec 2001 01:36:50 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Date: Thu, 06 Dec 2001 01:36:43 +0900 (JST)
Message-Id: <20011206.013643.69995088.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.freebsd.org, robert.moore@intel.com
Cc: andrew.grover@intel.com, iwasaki@jp.FreeBSD.org
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
In-Reply-To: <B9ECACBD6885D5119ADC00508B68C1EA2FE081@orsmsx107.jf.intel.com>
References: <B9ECACBD6885D5119ADC00508B68C1EA2FE081@orsmsx107.jf.intel.com>
X-Mailer: Mew version 2.0 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1517
Subject: [acpi-jp 1517] Re: problem in AcpiExSystemWaitSemaphore()
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Hi,

> This is a *very* degenerate case, and I'm not convinced that it's worth
> adding any additional code to try and "cleanup" on a failure from
> AcpiExEnterInterpreter.
> 
> If the interpreter cannot be locked again, something is very, very seriously
> wrong.  At the minimum, the currently running method must be aborted, but
> chances are that the entire ACPI subsystem is corrupted, and perhaps even
> the kernel itself is crashed.

OK, I understand that deleting semaphore doesn't make sense in falier case.
However, my point is still 'we must return the status from second
AcpiOsWaitSemaphore() calling w/o any adjustments if we get
interpreter again successfully'.
Currently it seems that we return AE_TIME in usual case.
I've just made simplified patch.  I think it's clearer than before.

Thanks

Index: exsystem.c
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/exsystem.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 exsystem.c
--- exsystem.c	7 Sep 2001 01:22:24 -0000	1.1.1.7
+++ exsystem.c	5 Dec 2001 16:23:47 -0000
@@ -172,8 +172,7 @@
 
         /* Reacquire the interpreter */
 
-        Status = AcpiExEnterInterpreter ();
-        if (ACPI_SUCCESS (Status))
+        if (ACPI_FAILURE(AcpiExEnterInterpreter ()))
         {
             /* Restore the timeout exception */
 

