From owner-freebsd-current Mon Oct 2 2:52:35 2000 Delivered-To: freebsd-current@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id 49ED737B503; Mon, 2 Oct 2000 02:52:31 -0700 (PDT) Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92]) by tasogare.imasy.or.jp (8.10.2+3.3W/3.7W-tasogare/smtpfeed 1.07) with ESMTP id e929qSr38391; Mon, 2 Oct 2000 18:52:28 +0900 (JST) (envelope-from 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 In-Reply-To: <200010020808.e9288Gh00664@mass.osd.bsdi.com> References: <200010020642.e926g4h00359@mass.osd.bsdi.com> <200010020808.e9288Gh00664@mass.osd.bsdi.com> X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20001002185030U.iwasaki@jp.FreeBSD.org> Date: Mon, 02 Oct 2000 18:50:30 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 20000228(IM140) Lines: 57 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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 #include #include +#include /* * 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