From owner-freebsd-current Mon Feb 17 9:31:18 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DA5D37B401; Mon, 17 Feb 2003 09:31:16 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id A78F043F75; Mon, 17 Feb 2003 09:31:14 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id h1HHVD3Y030852; Mon, 17 Feb 2003 10:31:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 17 Feb 2003 10:30:16 -0700 (MST) Message-Id: <20030217.103016.58455672.imp@bsdimp.com> To: nyan@jp.FreeBSD.org Cc: peter@wemm.org, sos@FreeBSD.ORG, current@FreeBSD.ORG, mdodd@FreeBSD.ORG Subject: Re: The cbus driver for pc98 From: "M. Warner Losh" In-Reply-To: <20030217.173114.85351300.nyan@jp.FreeBSD.org> References: <20030216.235014.111547234.imp@bsdimp.com> <20030217070601.78E612A89E@canning.wemm.org> <20030217.173114.85351300.nyan@jp.FreeBSD.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20030217.173114.85351300.nyan@jp.FreeBSD.org> Takahashi Yoshihiro writes: : In article <20030217070601.78E612A89E@canning.wemm.org> : Peter Wemm writes: : : > I can understand if you do not like to call your cbus hardware "ISA" : > devices, but also consider that on most pc-at hardware there are no "ISA" : > devices either. : : These are completely different. All PC-98 machines don't have "ISA" : devices and buses at all, but a little old PC-AT machines have "ISA" : buses. And, even if the PC-AT machine does not have "ISA" buses, it : has "PCI-ISA" bridge. I understand this. : > Things like the floppy controller, keyboard controller, : > counter/timer, rtc, etc etc are all on motherboard busses. Many are on : > things like X-bus, v-link, or other custom "quick and dirty" host busses. : : FYI, NetBSD/pc98 has the "systm" virtual bus. It might be worth considering this in the long term. For the moment, however, I'm not sure sure this is the right way to go. : > I would rather live with #ifdef PC98 than : > to have a duplicate set of isa/* and i386/* files that are nearly identical : > except for include file paths, #ifdef PC98 and s/isa/cbus/. I'm sure there : > are other ways to improve the situation without having to resort to this : > mass duplication of code. : : How? : : I have had some questions like "Does PC98 have ISA bus?" or "Why PC98 : uses ISA driver?". To clear these questions and problems, I think : that adding separated cbus driver is better way. I think that adding a separate cbus driver is better. I understand why you want it. I just object to the way you've done it. Cbus is to ISA as CardBus is to PCI in many ways. Cbus is very much like ISA in all but a few details. CardBus is pci with a few twists and turns that differ. If you look at how we've implemented cardbus, you'll see that we've tried to do it as a 'subclass' of the pci bus. We implement the PCI interfaces in the cardbus bus code, even though it is not really a pci bus. I'd propose that cbus implements the ISA interfaces in a similar manner. I'll be the first to admit that the cardbus implementation in this area is incomplete. sys/dev/cardbus/cardbus.c contains too much pci bus code copied with s/pci/cardbus/g applied. Not all the pci drivers that can be cardbus drivers also have the appropriate designation in the sys/conf/files file. However, most cardbus drivers are written by adding one line to the pci attachment. I suspect that for the vast majority of the ISA drivers this would hold true for cbus. I know others have said that there is no need at all for cbus as a separate bus. I'd argue that we do need a separate bus for it, since it is more different than ISA than the xbus, vlink are. However, it isn't so different that it needs its own CBUS_PNP_PROBE interface that is identical to ISA_PNP_PROBE (even if the implementation of the PNP probing is different). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message