From owner-acpi-jp@jp.freebsd.org  Thu Aug  2 05:32:17 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id FAA61638;
	Thu, 2 Aug 2001 05:32:17 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mail.wrs.com (unknown-1-11.windriver.com [147.11.1.11])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id FAA61633
	for <acpi-jp@jp.freebsd.org>; Thu, 2 Aug 2001 05:32:16 +0900 (JST)
	(envelope-from jhb@FreeBSD.org)
Received: from laptop.baldwin.cx (john@[147.11.46.217])
	by mail.wrs.com (8.9.3/8.9.1) with ESMTP id NAA29112;
	Wed, 1 Aug 2001 13:31:44 -0700 (PDT)
Message-ID: <XFMail.010801132306.jhb@FreeBSD.org>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <200108010633.f716Xum01739@mass.dis.org>
Date: Wed, 01 Aug 2001 13:23:06 -0700 (PDT)
From: John Baldwin <jhb@FreeBSD.org>
To: Mike Smith <msmith@FreeBSD.org>
Cc: acpi-jp@jp.freebsd.org
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1209
Subject: [acpi-jp 1209] RE: kqueue stuff(revised)
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: jhb@FreeBSD.org


On 01-Aug-01 Mike Smith wrote:
> 
> I'd like to review this; I'll try to get to it tonight.  I'm still not 
> happy about the specific unit number stuff in the change notifications, 
> but I haven't had time to think about it properly.  If you get impatient 
> and commit it, I can always complain and have you change it later. 8)
> 
> Regards,
> Mike

Why do we need to multiplex everything acpi related onto /dev/acpi?  We might
as well multiplex all disk access onto a /dev/disk and use special masks to
specify which disk we want. :(  We already have separate new-bus devices for
things like batteries.  I think the real fix is that we should have things like
/dev/batt0, /dev/batt1 (note, no acpi specific names here, so batt0 instead of
acpi_cmbat0), /dev/cpu0, /dev/acad0, /dev/lid0, etc.  There will be a little
bit of extra overhead due to each device needing little stub routines for
things like open, close, etc., but we already have ioctl routines for all of
these devices already.  You could then just attach kevent's to the devices you
wanted to listen to.  This seems to be the more sensible role to me.  If you
are worried about using up all the major numbers then:

a) In the future devfs will make it so we don't have to worry about majors

b) For the time being you can simply use minor units for the devices, although
   I think so far you'd be up to < 10 majors right now (batt, lid, cpu, tz,
   acad, button)

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
