From owner-cvs-all Sun Oct 7 20:26:52 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 7335037B401; Sun, 7 Oct 2001 20:26:46 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id NAA00828; Mon, 8 Oct 2001 13:26:37 +1000 Date: Mon, 8 Oct 2001 13:25:55 +1000 (EST) From: Bruce Evans X-X-Sender: To: Warner Losh Cc: Marcel Moolenaar , , Subject: Re: cvs commit: src/sys/ia64/include cpufunc.h In-Reply-To: <200110072005.f97K5O753677@harmony.village.org> Message-ID: <20011008131340.N13486-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 7 Oct 2001, Warner Losh wrote: > In message <20011007123737.A380@athlon.pn.xcllnt.net> Marcel Moolenaar writes: > : Above you say that drivers for *BSD are supposed to use the bus_space > : functions. This seems to contradict with the statement that we added > : the mem*io functions for compatibility with NetBSD on Alpha. This is > : fine, but it makes it all the harder for me to figure out what we call > : "right", so that I can do it right the first time. > > There's more to the kernel than just the drivers. The mem*io > functions were used to implement routines that the drivers call. No. These functions don't exist on i386's and are just compatibility cruft on alphas. > The big picture is that drivers are supposed to use bus_space. > bus_space can be coded directly to the iron, or can use cpufunc.h. > cpufunc.h generally shouldn't be used in drivers or by userland > programs (although it is used by many many different userland programs > as there's no other api that we support). That's another bug suite. When I wrote cpufunc.h, I intended at least inb() and outb() to be usable in both the kernel and userland, but David Greenman taught me that that would be wrong :-). This left no supported interface for userland but that didn't stop bad programs using unsupported ones of course. > Do not remove the inb/outb functions from cpufunc.h. For better or > worse, it is used by userland programs. Many ports will break. They can at least be moved to where other BSD's have them. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message