From owner-acpi-jp@jp.freebsd.org  Thu Mar 22 07:27:05 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id HAA18986;
	Thu, 22 Mar 2001 07:27:05 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from hypnos.cps.intel.com (hypnos.cps.intel.com [192.198.165.17])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id HAA18981
	for <acpi-jp@jp.freebsd.org>; Thu, 22 Mar 2001 07:27:04 +0900 (JST)
	(envelope-from andrew.grover@intel.com)
Received: from SMTP (fmsmsxvs04-1.fm.intel.com [132.233.42.204])
	by hypnos.cps.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.35 2001/02/12 09:03:45 smothers Exp $) with SMTP id WAA12941;
	Wed, 21 Mar 2001 22:26:24 GMT
Received: from fmsmsx27.FM.INTEL.COM ([132.233.48.27]) by 132.233.48.204
  (Norton AntiVirus for Internet Email Gateways 1.0) ;
  Wed, 21 Mar 2001 22:26:23 0000 (GMT)
Received: by fmsmsx27.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <HLKCMZKX>; Wed, 21 Mar 2001 14:26:20 -0800
Message-ID: <4148FEAAD879D311AC5700A0C969E8905DE799@orsmsx35.jf.intel.com>
From: "Grover, Andrew" <andrew.grover@intel.com>
To: "'acpi-jp@jp.freebsd.org'" <acpi-jp@jp.freebsd.org>, jhb@FreeBSD.org
Cc: "Moore, Robert" <robert.moore@intel.com>
Date: Wed, 21 Mar 2001 14:26:07 -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+000315
X-Sequence: acpi-jp 1112
Subject: [acpi-jp 1112] RE: acpica-unix-20010313.tar.gz
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: andrew.grover@intel.com

> From: Mitsuru IWASAKI [mailto:iwasaki@jp.freebsd.org]
> Here if our AcpiOsGetThreadId() returns 0, AcpiCmAcquireMutex()
> returns AE_ALREADY_ACQUIRED or AE_ACQUIRE_DEADLOCK because
> AcpiGbl_AcpiMutexInfo[i].OwnerId has 0 as initial value.
> 
> AcpiCmAcquireMutex() is called from AcpiAmlEnterInterpreter(),
> AcpiNsGetObjectValue(), AcpiNsEvaluateRelative(), AcpiCmExecute_HID(),
> AcpiGetObjectInfo(), acpi_MatchHid() and probe routines in 
> sys/dev/acpica/.

OK, does replacing:

if (AcpiGbl_AcpiMutexInfo[i].OwnerId == ThisThreadId)

in AcpiCmAcquireMutex and AcpiCmReleaseMutex with:

if ((AcpiGbl_AcpiMutexInfo[i].Locked) &&
    (AcpiGbl_AcpiMutexInfo[i].OwnerId == ThisThreadId))

..fix the problem? Bob (or anyone else), please tell me if I am off base.

Regards -- Andy

