Date: Sun, 24 Feb 2002 22:30:42 +0100 (MET) From: Magnus B{ckstr|m <b@etek.chalmers.se> To: Michael Smith <msmith@freebsd.org> Cc: current@freebsd.org Subject: Re: HEADS UP: ACPI CA updated Message-ID: <Pine.OSF.4.40.0202242227330.15157-100000@downy.etek.chalmers.se> In-Reply-To: <200202242018.g1OKIUG00719@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.40.0202242227330.15157-100000>