From owner-acpi-jp@jp.FreeBSD.org Sun Jul 14 11:16:08 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g6E2G8V06019;
	Sun, 14 Jul 2002 11:16:08 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g6E2G7n06014
	for <acpi-jp@jp.FreeBSD.org>; Sun, 14 Jul 2002 11:16:07 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5])
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id g6E2G5h52798;
	Sun, 14 Jul 2002 11:16:05 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Date: Sun, 14 Jul 2002 11:15:57 +0900 (JST)
Message-Id: <20020714.111557.118636519.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.FreeBSD.org, andrew.grover@intel.com
From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
In-Reply-To: <59885C5E3098D511AD690002A5072D3C02AB7F9E@orsmsx111.jf.intel.com>
References: <59885C5E3098D511AD690002A5072D3C02AB7F9E@orsmsx111.jf.intel.com>
X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
X-Sequence: acpi-jp 1682
Subject: [acpi-jp 1682] Re: Intel's acpi 
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: iwasaki@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020714

> > *BSD systems have the framework for this purpose.  In arch-specific
> > header directory, we can have arch-specific headers and 
> > arch-independent
> > source files can include them, like;
> > 
> > #include <machine/acpica_machdep.h>
> > 
> > i.e. in acfreebsd.h includes sys/i386/include/acpica_machdep.h or
> > sys/ia64/include/acpica_machdep.h depending on its machine 
> > architecture.
> > 
> > Sample code attached.  Could you review them?
> 
> This is what Linux does, too (well, the names are a little different but the
> idea is the same.)
> 
> So yes, this approach seems to work.

Thanks.  I attached small patch for previous version of acfreebsd.h
sample code.  This is needed to compile userland applications.  If you
adopt the arch-specific headers changes, please include this patch.

Tanks

--- sys/contrib/dev/acpica/acfreebsd.h	Sun Jul 14 11:10:07 2002
+++ /sys/contrib/dev/acpica/acfreebsd.h	Sat Jul 13 10:28:21 2002
@@ -126,6 +126,7 @@
 /* FreeBSD uses GCC */
 
 #include "acgcc.h"
+#include <machine/acpica_machdep.h>
 
 #ifdef _KERNEL
 #include "opt_acpi.h"
@@ -135,7 +136,6 @@
 #include <sys/systm.h>
 #include <sys/libkern.h>
 #include <machine/stdarg.h>
-#include <machine/acpica_machdep.h>
 
 #ifdef DEBUGGER_THREADING
 #undef DEBUGGER_THREADING

