From owner-cvs-all Tue Sep 28 13:10: 4 1999 Delivered-To: cvs-all@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 87D2114C3F; Tue, 28 Sep 1999 13:09:57 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id OAA31366; Tue, 28 Sep 1999 14:09:49 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id OAA05966; Tue, 28 Sep 1999 14:09:47 -0600 (MDT) Message-Id: <199909282009.OAA05966@harmony.village.org> To: Bruce Evans Subject: Re: cvs commit: src/sys/conf files src/sys/i386/conf files.i386 Cc: Takahashi Yoshihiro , winter@jurai.net, kato@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, FreeBSD98-hackers@jp.freebsd.org In-reply-to: Your message of "Wed, 29 Sep 1999 05:48:29 +1000." References: Date: Tue, 28 Sep 1999 14:09:47 -0600 From: Warner Losh Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In message Bruce Evans writes: : In more detail: I see what you are saying... I'm not sure I necessarily agree with its implied conclusions, however... Must think about this some more. It sounds like you are suggesting that it wouldn't make sense to convert, say, the sio driver to use bus_space even though there appear to be some wins for doing this from a flexibility point of view. The costs for slow machines are too high, if I understand what you are getting at here. : > : > bus_space_handle_t is the union instead of u_int. : > : > : > : > union bus_space_handle { : > : > bus_addr_t bsh_base; : > : > bus_addr_t *bsh_iat; : > : > }; : > : > typedef union bus_space_handle bus_space_handle_t; : > : : > : Doesn't this require changing all drivers that currently use the : > : bus space functions to be changed to initialise their sc->sc_bsh.base : > : instead of their sc->sc_bsh? This is uglier than casting. : > : > No. There are remarkably few drivers that do math or other naughty : > things with their bus handle. There are likely only 3-5 in the tree. : > Doesn't sound like an undue burdon to me. I had an experimental bus : : It's incompatible with NetBSD, etc. Only the first member of a union : can be initialised statically in Standard C. A bus_space_handle_t is an opaue data type. All the drivers in NetBSD that use bus_space that I've looked at are careful to only take the bsh from the config data and never do math on it directly. FreeBSD's tree is a little sloppier here because bus_space was imported incompletely into FreeBSD and isn't as religiously used as in NetBSD. bus_space_handles are never initialized directly by the drivers, in theory. That's why it would be nice to have some extension to rman to take an array of addresses from somewhere (where I'm not sure), package that up into one struct resource * and then have the driver get the bus_space_tag_t/handle_t from there. Where that is, what syntax config things need to use, etc is left up to the pc98's isa bus extentions to cope with this... I think this would make a good topic for FreeBSDCon. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message