From owner-acpi-jp@jp.freebsd.org  Tue Nov  6 08:58:40 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id IAA27404;
	Tue, 6 Nov 2001 08:58:40 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from calliope1.fm.intel.com (fmfdns01.fm.intel.com [132.233.247.10])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id IAA27398;
	Tue, 6 Nov 2001 08:58:39 +0900 (JST)
	(envelope-from robert.moore@intel.com)
Received: from fmsmsxvs041.fm.intel.com (fmsmsxv041-1.fm.intel.com [132.233.48.109])
	by calliope1.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.46 2001/10/25 21:02:55 root Exp $) with SMTP id XAA06557;
	Mon, 5 Nov 2001 23:58:30 GMT
Received: from FMSMSX016.fm.intel.com ([132.233.42.195])
 by fmsmsxvs041.fm.intel.com (NAVGW 2.5.1.6) with SMTP id M2001110515595002096
 ; Mon, 05 Nov 2001 15:59:50 -0800
Received: by fmsmsx016.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <V0XCBNWC>; Mon, 5 Nov 2001 15:57:09 -0800
Message-ID: <B9ECACBD6885D5119ADC00508B68C1EA2FDFDB@orsmsx107.jf.intel.com>
From: "Moore, Robert" <robert.moore@intel.com>
To: "'acpi-jp@jp.freebsd.org'" <acpi-jp@jp.freebsd.org>
Cc: "'Mitsuru IWASAKI'" <iwasaki@jp.freebsd.org>,
        "Grover, Andrew"<andrew.grover@intel.com>,
        "Therien, Guy" <guy.therien@intel.com>,
        "Diefenbaugh, Paul S" <paul.s.diefenbaugh@intel.com>
Date: Mon, 5 Nov 2001 15:58:26 -0800 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1441
Subject: [acpi-jp 1441] RE: ACPI CA Mutex patches 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: robert.moore@intel.com


1) Nothing is being returned, implicitly or otherwise.  I'm just indicating
(AE_OK) that nothing went wrong.

2) Yes, we know immediately and I will make this change.

3) We check, and in fact we currently force-release any held mutexes.
However, it may be more appropriate to abort with an error -- this is open
to discussion and interpretation of the ACPI spec.

Bob


-----Original Message-----
From: Mike Smith [mailto:msmith@freebsd.org]
Sent: Monday, November 05, 2001 3:42 PM
To: acpi-jp@jp.freebsd.org
Cc: 'Mitsuru IWASAKI'; Grover, Andrew; Therien, Guy; Diefenbaugh, Paul S
Subject: [acpi-jp 1440] Re: ACPI CA Mutex patches 


> I'd also like to make sure that everyone agrees on the "correct" behavior
of
> this type of AML code, and here are some more examples along with my
> understanding of what should happen:
> 
>     Mutex(MUT0, 1)
>     Mutex(MUT1, 0)
> 
> 
>     Method(TES2)
>     {
>             TE21()
>             TE22()                  /* AE_OK */

This won't work because you don't support implicit returns...

>     }
>     Method(TE21)
>     {
>             Acquire(MUT0, 0x500)
>     }
>     Method(TE22)
>     {
>             Release(MUT0)

... here. 8)

>     Method(TES4)
>     {
>             Acquire(MUT1, 0x500)
>             Acquire(MUT0, 0x500)
>             Release(MUT1)
>             Release(MUT0)           /* AE_AML_MUTEX_ORDER */
>     }

I think this should error as soon as MUT1 is released; at that point
you already know that ordering has been violated.

It's also not clear to me what should happen on return from a top-level
method invocation if a mutex is left held.  Do you plan to check?

Regards,
Mike
