From owner-acpi-jp@jp.freebsd.org  Wed Oct 18 08:13:45 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id IAA99752;
	Wed, 18 Oct 2000 08:13:45 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mass.osd.bsdi.com (termroom.bsdcon.org [206.55.247.2])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id IAA99747
	for <acpi-jp@jp.freebsd.org>; Wed, 18 Oct 2000 08:13:43 +0900 (JST)
	(envelope-from msmith@mass.osd.bsdi.com)
Received: from mass.osd.bsdi.com (localhost [127.0.0.1])
	by mass.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e9HNGAh00887
	for <acpi-jp@jp.freebsd.org>; Tue, 17 Oct 2000 16:16:11 -0700 (PDT)
	(envelope-from msmith@mass.osd.bsdi.com)
Message-Id: <200010172316.e9HNGAh00887@mass.osd.bsdi.com>
X-Mailer: exmh version 2.1.1 10/15/1999
To: acpi-jp@jp.freebsd.org
In-reply-to: Your message of "Wed, 04 Oct 2000 16:34:33 +0900."
             <200010040734.QAA36671@shidahara1.planet.sci.kobe-u.ac.jp> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 17 Oct 2000 16:16:10 -0700
From: Mike Smith <msmith@freebsd.org>
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 875
Subject: [acpi-jp 875] Re: Busy wait solution. (Re: ACPI megapatch ) 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: msmith@freebsd.org


I think I have a similar situation to this going on at the moment.  I 
seem to remember someone posting a patch which limited the number of 
times a WhileOp loop would go around, but I can't find it in the list 
archives or my own archives.  

Does anyone have this code, or any other suggestions?

> In message <200010040725.e947Pbh09841@mass.osd.bsdi.com>, Mike Smith $B$5$s$$$o$/(B
> :
> 
> >> This patch gives OS a chance to switch context or forced termination.
> >> As far as I know, no AML method execute infinitely.
> >> This code remains a possibility of infinite loop:
> >> Loop count is hold in local value in a function , and when execute other
> >> method call, the loop count is reset.Possible solution is add loop count
> >> member to ACPI_WALK_STATE .
> >> 
> >> Comment?
> >
> >Do you have a sample of the AML that's causing the problem here (I may 
> >have deleted it without realising).  It's possible that the loop is 
> >waiting for another method that should be executed in response to a GPE 
> >or SMI.  
> >
> Archive of this mailinglist can be read in 
> http://home.jp.FreeBSD.org/mail-list/acpi-jp/
> I quote the mail.
> 
> ======
> 
> \\_SB_.PCI0.IDE_.PRIM.MAST._STA 
> 
> 	Method(_STA) {
> 		Return(PHSB(0xe3,0x0))
> 	}
> 
> OperationRegion(SMI0, SystemMemory, 0x0bfffdbc, 0x00000200)
> Field(SMI0, AnyAcc, NoLock, Preserve) {
>     BCMD,	8,
>     DID_,	32,
>     INFO,	4000
> }
> Field(SMI0, AnyAcc, NoLock, Preserve) {
>     Offset(0x5),
>     INFB,	8
> }
> 
> OperationRegion(SMI1, SystemIO, 0x00008040, 0x00000002)
> Field(SMI1, AnyAcc, NoLock, Preserve) {
>     SMIC,	8
> }
> Mutex(MPHS, 0)
> Method(PHS0, 1) {
>     Store(Arg0, BCMD)
>     Store(Zero, SMIC)
>     While(LEqual(BCMD, Arg0)) { <- HERE.
>     }
>     Store(0x0, BCMD)
> }
> Method(PHSB, 2, Serialized) {
>     Acquire(MPHS, 0xffff)
>     Store(0x0, DID_)
>     Store(Arg1, INFB)
>     PHS0(Arg0)
>     Store(INFB, Local0)
>     Release(MPHS)
>     Return(Local0)
> }
> ====
> 
> This seems to me BIOS transaction.
> 
> $BEOJUB:5*(B
> $B?@8MBg3XBg3X1!<+A32J3X8&5f2J(BD3$B>pJs%a%G%#%"2J3X@l96(B
> <a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html">
> Public Key</a>
> Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 
> 
> 
> 
> 
> 

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E


