Re: HEADS UP: ACPI CA updated

2002-02-25 Thread Emiel Kollof


Magnus B{ckstr|m heeft op zondag 24 februari 2002 om 22:30 het volgende 
geschreven:

 + mtx_lock(Giant);
 +

Wasn't this _not_ the way to lock GIant, according to Matt Dillon? Look 
for previous posts where he explains.

Cheers,
Emiel Kollof


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP: ACPI CA updated

2002-02-24 Thread Magnus B{ckstr|m

Wow!  This did away with the once-a-minute error messages from Notify()s
on processor objects on my laptop.

However, I am now getting frequent panics from from a GIANT_REQUIRED
assertion in kmem_malloc().  kmem_malloc() gets called via malloc() from
AcpiOsAllocate(), without Giant locked.

The call to AcpiOsAllocate() happens deep in a AML object evaluation
in from acpi_tz_thread().

I tried naively to modify AcpiOsAllocate to grab Giant before malloc()
and release it afterward, but this appears to be a very bad idea: There
is a mtx_assert(Giant, MA_NOTOWNED) in ithread_loop() in kern/kern_intr.c
which blows up during boot.

Regards, Magnus


On Fri, 22 Feb 2002, Mike Smith wrote:
 Subject: HEADS UP: ACPI CA updated


 I've finally updated the ACPI CA codebase with Intel's 20020214 drop
 (yes, I tagged it 0217, my bad).

 This is the first drop that Intel haven't asked me not to commit since
 the 20011120 version, so there are a large number of changes and
 bugfixes.  See Intel's logs at
  http://developer.intel.com/technology/iapc/acpi for more details.

 There aren't many changes in the FreeBSD-specific code, this is just
 catching up with major improvements in the interpreter.

 As usual, please report any problems or success to the list.

 Regards,
 Mike


 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-current in the body of the message



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP: ACPI CA updated

2002-02-24 Thread Michael Smith

 Wow!  This did away with the once-a-minute error messages from Notify()s
 on processor objects on my laptop.
 
 However, I am now getting frequent panics from from a GIANT_REQUIRED
 assertion in kmem_malloc().  kmem_malloc() gets called via malloc() from
 AcpiOsAllocate(), without Giant locked.
 
 The call to AcpiOsAllocate() happens deep in a AML object evaluation
 in from acpi_tz_thread().
 
 I tried naively to modify AcpiOsAllocate to grab Giant before malloc()
 and release it afterward, but this appears to be a very bad idea: There
 is a mtx_assert(Giant, MA_NOTOWNED) in ithread_loop() in kern/kern_intr.c
 which blows up during boot.

Try grabbing Giant in acpi_tz_thread when it wakes up, then dropping it 
again before it goes to sleep.  This is probably a hack, but I'd guess a 
required one for now. 

If that works, send me a diff and I'll commit it with thanks!

Regards,
Mike

-- 
To announce that there must be no criticism of the president,
or that we are to stand by the president, right or wrong, is not
only unpatriotic and servile, but is morally treasonable to 
the American public.  - Theodore Roosevelt



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP: ACPI CA updated

2002-02-24 Thread Magnus B{ckstr|m

On Sun, 24 Feb 2002, Michael Smith wrote:
 Try grabbing Giant in acpi_tz_thread when it wakes up, then dropping it
 again before it goes to sleep.  This is probably a hack, but I'd guess a
 required one for now.

 If that works, send me a diff and I'll commit it with thanks!

Yow!  Works absolutely fine.  Patch below!

Thanks!
Magnus

--- sys/dev/acpica/acpi_thermal.c.ctm   Sun Feb 24 13:55:13 2002
+++ sys/dev/acpica/acpi_thermal.c   Sun Feb 24 23:20:39 2002
@@ -31,6 +31,8 @@
 #include sys/param.h
 #include sys/kernel.h
 #include sys/kthread.h
+#include sys/lock.h
+#include sys/mutex.h
 #include sys/bus.h
 #include sys/proc.h
 #include sys/reboot.h
@@ -780,6 +782,8 @@
 for (;;) {
tsleep(acpi_tz_proc, PZERO, nothing, hz * acpi_tz_polling_rate);

+   mtx_lock(Giant);
+
if (devcount == 0)
devclass_get_devices(acpi_tz_devclass, devs, devcount);

@@ -787,5 +791,7 @@
for (i = 0; i  devcount; i++)
acpi_tz_timeout(device_get_softc(devs[i]));
ACPI_UNLOCK;
+
+   mtx_unlock(Giant);
 }
 }


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP: ACPI CA updated

2002-02-23 Thread Dag-Erling Smorgrav

Mike Smith [EMAIL PROTECTED] writes:
 I've finally updated the ACPI CA codebase with Intel's 20020214 drop
 (yes, I tagged it 0217, my bad).

...so just retag it.  Add the correct tag on top of the incorrect one,
then remove the incorrect tag.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP: ACPI CA updated

2002-02-23 Thread David Wolfskill

Date: Fri, 22 Feb 2002 21:56:47 -0800
From: Mike Smith [EMAIL PROTECTED]

I've finally updated the ACPI CA codebase with Intel's 20020214 drop

Yay...!

There aren't many changes in the FreeBSD-specific code, this is just
catching up with major improvements in the interpreter.

As usual, please report any problems or success to the list.

Well, I see that the code is now able to distinguish between battery 1
not present vs. battery 1 drained (at least for my laptop) --
seems like progress!

Thanks,
david   (links to my resume at http://www.catwhisker.org/~david)
-- 
David H. Wolfskill  [EMAIL PROTECTED]
I believe it would be irresponsible (and thus, unethical) for me to advise,
recommend, or support the use of any product that is or depends on any
Microsoft product for any purpose other than personal amusement.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP: ACPI CA updated

2002-02-22 Thread Alfred Perlstein

* Mike Smith [EMAIL PROTECTED] [020222 21:56] wrote:
 
 I've finally updated the ACPI CA codebase with Intel's 20020214 drop
 (yes, I tagged it 0217, my bad).

Woo!  Go Mike!

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP, ACPI CA updated.

2001-05-29 Thread Mike Smith

 
 The ACPI core code in -current has been updated to the 20010518 drop from 
 Intel.  You can read more about APCI CA at
 
http://developer.intel.com/technology/ial/acpi

Sorry, that should be 

http://developer.intel.com/technology/iapc/acpi

Regards,
Mike
-- 
... 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



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: HEADS UP, ACPI CA updated.

2001-05-29 Thread nnd


As a result 'make buildkernel' is broken in
'sys/dev/acpica/Osd'. The next patch permits me to finish
kernel building.

N.Dudorov


Index: sys/dev/acpica/Osd/OsdSchedule.c
===
RCS file: /scratch/CVS/src/sys/dev/acpica/Osd/OsdSchedule.c,v
retrieving revision 1.8
diff -b -u -r1.8 OsdSchedule.c
--- sys/dev/acpica/Osd/OsdSchedule.c2001/05/29 20:13:42 1.8
+++ sys/dev/acpica/Osd/OsdSchedule.c2001/05/30 04:29:39
@@ -37,6 +37,7 @@
 #include sys/malloc.h
 #include sys/taskqueue.h
 #include machine/clock.h
+#include sys/proc.h
 
 #define _COMPONENT ACPI_OS_SERVICES
 MODULE_NAME(SCHEDULE)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message