diff options
author | Warner Losh <imp@FreeBSD.org> | 1999-07-03 20:14:08 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 1999-07-03 20:14:08 +0000 |
commit | 279f2101e732045b16d5fa11c0e0f1b6730be6a7 (patch) | |
tree | da1cf0b95be1860408e9637a2f0b1d7ee7e7c0ea /sys/amd64/include/bus_amd64.h | |
parent | f5f8bec2d6a3f9b7f1c9180df95b43316e281eb2 (diff) |
Improve compatibility with other systems by changing the default
behavior slightly.
If machine/bus.h is included, but neither bus_memio.h nor bus_pio.h
are included, then behave as if both were included.
This won't change existing drivers, all of which include one or more
of bus_{p,mem}io.h, but will allow drivers from other systems to come
over with fewer changes. I freely admit that this might not be
optimal for some drivers, but those drivers can be optimized for
FreeBSD after the initial bringup happens.
Without the change, there is a bug that preclude drivers from
compiling with strange warning/errors.
I've been running this here for a while now w/o ill effects.
Reviewed by: gibbs
Not objected to by: bde, arch@ list.
Notes
Notes:
svn path=/head/; revision=48527
Diffstat (limited to 'sys/amd64/include/bus_amd64.h')
-rw-r--r-- | sys/amd64/include/bus_amd64.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/amd64/include/bus_amd64.h b/sys/amd64/include/bus_amd64.h index 75b2b7310a19..28e80ba2b89a 100644 --- a/sys/amd64/include/bus_amd64.h +++ b/sys/amd64/include/bus_amd64.h @@ -67,7 +67,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bus.h,v 1.3 1998/05/06 01:45:47 gibbs Exp $ */ +/* $Id: bus.h,v 1.4 1998/09/29 09:06:00 bde Exp $ */ #ifndef _I386_BUS_H_ #define _I386_BUS_H_ @@ -75,6 +75,15 @@ #include <machine/cpufunc.h> /* + * To remain compatible with NetBSD's interface, default to both memio and + * pio when neither of them is defined. + */ +#if !defined(_I386_BUS_PIO_H_) && !defined(_I386_BUS_MEMIO_H_) +#define _I386_BUS_PIO_H_ +#define _I386_BUS_MEMIO_H_ +#endif + +/* * Values for the i386 bus space tag, not to be used directly by MI code. */ #define I386_BUS_SPACE_IO 0 /* space is i/o space */ |