Subject: Re: MI bus ops(Re: 16bit aligned NS16550 variant)
To: None <>
From: None <>
List: tech-kern
Date: 11/09/2001 10:59:46 ("Jason R Thorpe") writes:
> I think what I'd really like to see here is for <machine/bus.h> to be
> replaced by:

I pretty much agree completely.

> 	<sys/bus.h>
> 		Included as <machine/bus.h> is now.  Defines the
> 		bus_space_tag_t, bus_dma_tag_t.  Each has the
> 		ops pointers and a void *cookie.  If <machine/bus_types.h>
> 		does not define __BUS_SPACE_MD_CALLS, then it defines
> 		the macros that actually call the bus_space methods.
> 		This allows MD code to simply use pointer derefs for
> 		certain types of space, if it wants to.
> 	<machine/bus_types.h>
> 		Included by <sys/bus.h>, defines various types that
> 		<sys/bus.h> needs.  Also optionally defines things
> 		like __BUS_SPACE_FAST_ABI (which might e.g. define
> 		a faster ABI to be used for bus space methods, such
> 		as regparm on the x86).

Why should the latter by anything but <machine/bus.h>?

It'll be a bit more of a hassle for conversion, but not that much...