From owner-acpi-jp@jp.freebsd.org  Fri Sep 29 22:07:35 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id WAA35933;
	Fri, 29 Sep 2000 22:07:35 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id WAA35927
	for <acpi-jp@jp.freebsd.org>; Fri, 29 Sep 2000 22:07:35 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
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 e8TD7Rr87912;
	Fri, 29 Sep 2000 22:07:27 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
To: msmith@freebsd.org
Cc: haro@tk.kubota.co.jp, takawata@shidahara1.planet.sci.kobe-u.ac.jp,
        current@freebsd.org, acpi-jp@jp.freebsd.org
In-Reply-To: <200009290916.e8T9GmA04415@mass.osd.bsdi.com>
References: <200009290916.e8T9GmA04415@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: <20000929220517P.iwasaki@jp.FreeBSD.org>
Date: Fri, 29 Sep 2000 22:05:17 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 20000228(IM140)
Lines: 58
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 691
Subject: [acpi-jp 691] Re: ACPI megapatch
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Thanks a lot mike, these are mostly acceptable for me.

> Here's the latest ACPI megapatch:
> 
>  - Move all the register I/O into a separate file

Agreed.

>  - Made all the I/O spaces use proper bus resources
>  - Allocate the resources in machine-dependant code

I prefer previous patch because most of the code in i386/acpi_machdep.c
can be shared with IA64 I think.

>  - Map ACPI-used memory in machine-dependant code

Agreed.

>  - Create a machine-dependant "acpiprobe" device which just knows
>    how to find and set up ACPI for the machine-independant code

I think only machine-dependant sub-routines should be in acpi_machdep.c,
the rest common code should be moved back to dev/acpi/acpi.c.
The first half of acpiprobe_identify() is trying to find rsdp, so
renaming it to acpi_find_rsdp() (returns struct ACPIrsdp * or NULL),
moving the rest of acpiprobe_identify() to dev/acpi/acpi.c:acpi_identify()
and calling acpi_find_rsdp() from acpi_identify() would be better for me.
acpiprobe_mapmem() seems machine-dependant, so just renaming (acpi_mapmem() ?)
would be enough.
acpiprobe_facp(), I think, is MI, should be moved dev/acpi/acpi.c and
renamed (acpi_find_facp() ?).

In summary, my suggestions are
 - i386/i386/acpi_machdep.c
	acpi_find_rsdp() and acpi_mapmem()
 - dev/acpi/acpi.c
	acpi_identify() and acpi_find_facp()

>  - Remove all the ACPI #ifdefs from non-ACPI code
>  - Minor style and commenting fixes

Completely agreed.

> Issues outstanding:
> 
>  - Need to remove superfluous headers
>  - Need to decide the correct split between <sys/acpi.h> and 
>    <sys/dev/acpi/acpi.h> in terms of functionality.

I'd like to move and rename them as I said in my previous mail,
<sys/acpi.h> -> <sys/dev/acpi/acpi.h>
	shared by both kernel and userland programs
<sys/dev/acpi/acpi.h> -> <sys/dev/acpi/acpivar.h>
	shared within kernel code (acpi stuff and related drivers)

That's my rough understanding, but I could be wrong :-)

Thanks
