_machdep.h file cleanup.
To: None <tech-kern@netbsd.org>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 03/12/1999 19:19:37
Long ago and far away, the convention was established (more or less by
me 8-) that <bus>_machdep.h files, the machine-dependent definitions,
types, etc., for the various bits of MI bus support (in sys/dev) would
live in <machine>/<bus>/<bus>_machdep.h. For instance, the i386 ISA
bus definitions live in i386/isa/isa_machdep.h.
That was a tradeoff: it means that there end up being MD #ifdefs (to
include the MD file) in the MI files. on the other hand, at the time,
it meant that /usr/include/machine wouldn't have to be polluted with
lots and lots of <bus>_machdep.h files.
Now (since the kernel include installation mechanism was changed to
descend into subdirs) there is a better alternative: put them in
<machine>/include/<bus>_machdep.h and just don't install them.
This was the original intent all along, and and shouldn't have any
effect on machine-independent code or user-visible APIs or anything.
(indeed, if the MD code were written properly, it wouldn't even have
much effect there, but it looks like there are a lot of direct
includes of the <bus>_machdep.h files...)
Anyway, this is relatively straightforward, but it affects a lot of
MI busses' <bus>var.h files:
eisa/eisavar.h
isa/isavar.h
isapnp/isapnpvar.h
ofisa/ofisavar.h
pci/pci.c
pci/pcivar.h
pcmcia/com_pcmcia.c
tc/tcvar.h
and corresponding MD files.
Shouldn't take long to do, and i'm planning to work on it this weekend
unless i hear some strong objections Soon.
Comments? 8-)
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.