Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Oct 2000 18:50:30 +0900
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        msmith@freebsd.org
Cc:        iwasaki@jp.FreeBSD.org, haro@tk.kubota.co.jp, takawata@shidahara1.planet.sci.kobe-u.ac.jp, current@freebsd.org, acpi-jp@jp.FreeBSD.org
Subject:   Re: ACPI megapatch 
Message-ID:  <20001002185030U.iwasaki@jp.FreeBSD.org>
In-Reply-To: <200010020808.e9288Gh00664@mass.osd.bsdi.com>
References:  <200010020642.e926g4h00359@mass.osd.bsdi.com> <200010020808.e9288Gh00664@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Actually, I couldn't make CVS do what I wanted, so it's a big tarball 
> with an itty-bitty little patch instead.
> 
> This requires an up-to-date -current kernel (for the pci_cfgreg changes, 
> etc.)
> 
> I haven't done anything special with newbus attachments yet, and the 
> embedded controller stuff is still broken, but this should compile and 
> run.  It needs resource management work (only interrupts are handled 
> correctly) and lots of event handlers and so on, but it should be a good 
> foundation to start with.

Great!  This is really great!!  I didn't think we can have ACPICA
kernel so earlier.

> Comments and suggestions would definitely be appreciated.
> 
>  http://people.freebsd.org/~msmith/acpica-bsd-20001002.tar.gz

OK, I have a patch for AcpiOsSleep and AcpiOsSleepUsec which I was
involed in recently.
For Semaphore, mtx_* (ported from BSD/OS?) is used in your implementation.
I just wonder if NetBSD people will use traditional lock...

--- OsdSchedule.c-	Mon Oct  2 18:20:32 2000
+++ OsdSchedule.c	Mon Oct  2 18:34:24 2000
@@ -36,6 +36,7 @@
 #include <sys/kernel.h>
 #include <sys/malloc.h>
 #include <sys/taskqueue.h>
+#include <machine/clock.h>
 
 /*
  * This is a little complicated due to the fact that we need to build and then
@@ -112,11 +113,20 @@
 void
 AcpiOsSleep (UINT32 Seconds, UINT32 Milliseconds)
 {
-    tsleep(NULL, 0, "acpislp", (Seconds * hz) + Milliseconds / (1000 * hz));
+    int	timo;
+
+    timo = (Seconds * hz) + Milliseconds / (1000 * hz);
+    if (timo == 0)	/* 0 means no timeout... */
+	timo = 1;
+    tsleep(NULL, 0, "acpislp", timo);
 }
 
 void
 AcpiOsSleepUsec (UINT32 Microseconds)
 {
-    tsleep(NULL, 0, "acpislp", Microseconds / (1000000 * hz));
+    if (Microseconds > 1000) {	/* the interpreter will be released */
+	AcpiOsSleep(0, Microseconds / 1000);
+    } else {
+	DELAY(Microseconds);
+    }
 }


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?20001002185030U.iwasaki>