RE: [ACPI] ACPI and PRREMPT bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's a quick patch that should stop the METHOD_LIMIT errors. It's just
a quick hack, not the correct solution.

Index: source/components/interpreter/parser/psparse.c
===================================================================
RCS file:
/home/cmplr/cvs/acpica/Acpi/source/components/interpreter/parser/psparse
.c,v
retrieving revision 1.158
diff -u -r1.158 psparse.c
--- source/components/interpreter/parser/psparse.c	2 Sep 2005
20:17:39 -0000	1.158
+++ source/components/interpreter/parser/psparse.c	7 Nov 2005
21:15:44 -0000
@@ -647,7 +647,10 @@
             {
                 /* Decrement the thread count on the method parse tree
*/
 
-                WalkState->MethodDesc->Method.ThreadCount--;
+                if (WalkState->MethodDesc->Method.ThreadCount)
+                {
+                    WalkState->MethodDesc->Method.ThreadCount--;
+                }
             }
 
             AcpiDsTerminateControlMethod (WalkState);


Linux version would look like this:


				/* Decrement the thread count on the
method parse tree */

				if
(walk_state->method_desc->method.thread_count) {
	
walk_state->method_desc->method.thread_count--;
				}


> -----Original Message-----
> From: Moore, Robert
> Sent: Monday, November 07, 2005 12:44 PM
> To: Moore, Robert; '[email protected]';
'[email protected]';
> '[email protected]'
> Subject: RE: [ACPI] ACPI and PRREMPT bug
> 
> You might try setting this flag (in acglobal.h) to TRUE:
> 
> /*
>  * Automatically serialize ALL control methods? Default is FALSE,
meaning
>  * to use the Serialized/NotSerialized method flags on a per method
basis.
>  * Only change this if the ASL code is poorly written and cannot
handle
>  * reentrancy even though methods are marked "NotSerialized".
>  */
> ACPI_EXTERN UINT8       ACPI_INIT_GLOBAL
(AcpiGbl_AllMethodsSerialized,
> FALSE);
> 
> 
> 
> > -----Original Message-----
> > From: Moore, Robert
> > Sent: Monday, November 07, 2005 12:42 PM
> > To: '[email protected]'; [email protected]; acpi-
> > [email protected]
> > Subject: RE: [ACPI] ACPI and PRREMPT bug
> >
> > I'm aware of this issue and it is under investigation.
> > Bob
> >
> >
> > > -----Original Message-----
> > > From: [email protected] [mailto:acpi-devel-
> > > [email protected]] On Behalf Of Nir Tzachar
> > > Sent: Monday, November 07, 2005 1:36 AM
> > > To: [email protected]; [email protected]
> > > Subject: [ACPI] ACPI and PRREMPT bug
> > >
> > > hello.
> > >
> > > I'm encountering a problem with acpi on kernels where preempt is
> > > enabled.
> > > The problem is 100% reproducible on all kernels starting from
2.6.12.1
> > > to 2.6.14
> > > ( i didn't try 2.6.11 and below ).
> > >
> > > the problem is manifested via the battery proc interface. to
produce
> it,
> > > run in two terminals simultaneously:
> > > while true; do cat /proc/acpi/battery/BAT0/info; done
> > >
> > > if i turn on kernel preemption (either voluntary or not), i get
the
> > > following error messages in dmesg:
> > > Nov  7 08:31:00 lapnir ACPI-0292: *** Error: Looking up [SERN] in
> > > namespace, AE_ALREADY_EXISTS
> > > Nov  7 08:31:00 lapnir ACPI-0508: *** Error: Method execution
failed
> > > [\_SB_.PCI0.LPC_.EC__.GBIF] (Node c18f5d60), AE_ALREADY_EXISTS
> > > Nov  7 08:31:02 lapnir ACPI-0213: *** Error: Method reached
maximum
> > > reentrancy limit (255)
> > > Nov  7 08:31:02 lapnir ACPI-0508: *** Error: Method execution
failed
> > > [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c18f5c20),
AE_AML_METHOD_LIMIT
> > >
> > > and with acpi debugging info turned on:
> > > Nov  7 08:46:08 lapnir dswload-0292: *** Error: Looking up [SERN]
in
> > > namespace, AE_ALREADY_EXISTS
> > > Nov  7 08:46:08 lapnir psloop-0287 [4399] ps_parse_loop         :
> During
> > > name lookup/catalog, AE_ALREADY_EXISTS
> > > Nov  7 08:46:08 lapnir psparse-0508: *** Error: Method execution
> failed
> > > [\_SB_.PCI0.LPC_.EC__.GBIF] (Node c18f94e8), AE_ALREADY_EXISTS
> > > Nov  7 08:46:08 lapnir osl-0856 [4403] os_wait_semaphore     :
Failed
> to
> > > acquire semaphore[c18de5e0|1|0], AE_TIME
> > > Nov  7 08:46:08 lapnir dsmethod-0213: *** Error: Method reached
> maximum
> > > reentrancy limit (255)
> > > Nov  7 08:46:08 lapnir psparse-0508: *** Error: Method execution
> failed
> > > [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c18f9268),
AE_AML_METHOD_LIMIT
> > > Nov  7 08:46:08 lapnir acpi_battery-0144 [4449] battery_get_info
> :
> > > Error evaluating _BIF
> > > Nov  7 08:46:08 lapnir dsmethod-0213: *** Error: Method reached
> maximum
> > > reentrancy limit (255)
> > > Nov  7 08:46:08 lapnir psparse-0508: *** Error: Method execution
> failed
> > > [\_SB_.PCI0.LPC_.EC__.BAT0._BIF] (Node c18f9268),
AE_AML_METHOD_LIMIT
> > >
> > >
> > > this is repeated until a reboot. loading and unloading the battery
> > > module does not help.
> > >
> > > My computer is a thinkpad t43p, and i didn't try to reproduce it
on
> > > another laptop
> > > (have no access to another model..).
> > > If you need more info, let me know.
> > >
> > > p.s. please cc me, im not in the list.
> > >
> > > --
> > > =========================================================
> > > Nir Tzachar.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux