Further normalize the _XXX_H_ symbols used to conditionalize header file
commit1534a15ca3a31e996488659db1f0f6e980e66511
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 23 Oct 2006 21:50:33 +0000 (23 21:50 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 23 Oct 2006 21:50:33 +0000 (23 21:50 +0000)
tree4a3d89d1ff6af3223cbe8347ddcf28e31fe6fa23
parentf4592fe59e1a6223b5ff1b435c8aaf6db4b7e5bb
Further normalize the _XXX_H_ symbols used to conditionalize header file
inclusion.

Use _MACHINE_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/include".
Most headers already did this, but some did not.

Use _ARCH_SUBDIR_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/subdir"
instead of _I386_SUBDIR_BLAH_H_.

Change #include's made in architecture-specific directories to use
<machine/blah.h> instead of "blah.h", allowing the included header files
to be overrdden by another architecture.  For example, a virtual kernel
architecture might include a header from arch/i386/include which then
includes some other header in arch/i386/include.  But really we want that
other header to also go via the arch/vkernel/include, so the header files
in arch/i386/include must use <machine/blah.h> instead of "blah.h" for most
of their sub-includes.

Change most architecture-specific includes such as <i386/icu/icu.h> to
use a generic path through the "arch" softlink, such as <arch/icu/icu.h>.

Remove the temporary -I@/arch shim made in a recent commit, the <arch/...>
mechanism replaces it.

These changes allow us to implement heirarchical architectural overrides,
primarily intended for virtual kernel support.  A virtual kernel uses an
architecture of 'vkernel' but must be able to access actual cpu-specific
header files such as those found in arch/i386.  It does this using a
"cpu" softlink.  For example, someone including <machine/atomic.h> in a
vkernel build would hit the "arch/vkernel/include/atomic.h" header, and this
header could then #include <cpu/atomic.h> to access the actual cpu's
atomic.h file: "arch/i386/include/atomic.h".

The ultimate effect is that an architecture can build on another
architecture's header and source files.
101 files changed:
sys/boot/common/isapnp.h
sys/boot/efi/include/ia64/pe.h
sys/bus/cam/scsi/scsi_low.h
sys/bus/eisa/eisaconf.h
sys/bus/isa/i386/isa.h
sys/bus/isa/i386/isa_device.h
sys/bus/isa/i386/isa_dma.c
sys/bus/isa/pnpeat.c
sys/bus/isa/rtc.h
sys/bus/isa/syscons_isa.c
sys/conf/kmod.mk
sys/cpu/i386/include/bus_at386.h
sys/cpu/i386/include/bus_dma.h
sys/cpu/i386/include/cpu.h
sys/cpu/i386/include/cpufunc.h
sys/cpu/i386/include/db_machdep.h
sys/cpu/i386/include/elf.h
sys/cpu/i386/include/float.h
sys/cpu/i386/include/floatingpoint.h
sys/cpu/i386/include/frame.h
sys/cpu/i386/include/specialreg.h
sys/crypto/blowfish/arch/i386/bf_enc_586.S
sys/crypto/blowfish/arch/i386/bf_enc_686.S
sys/crypto/des/arch/i386/des_enc.S
sys/dev/misc/gpib/gpib.h
sys/dev/misc/syscons/apm/apm_saver.c
sys/dev/netif/ar/if_ar.h
sys/dev/netif/fe/if_fe.c
sys/dev/netif/fe/if_fe_isa.c
sys/dev/netif/fe/if_fe_pccard.c
sys/dev/netif/ie/if_ie.c
sys/dev/netif/le/if_le.c
sys/dev/netif/pdq_layer/pdq_ifsubr.c
sys/dev/netif/rdp/if_rdp.c
sys/dev/netif/rdp/if_rdpreg.h
sys/dev/netif/sr/if_sr.h
sys/dev/raid/asr/asr.c
sys/dev/raid/dpt/dpt_control.c
sys/dev/serial/cy/cy.c
sys/dev/serial/cy/cy_pci.c
sys/dev/serial/rc/rc.c
sys/dev/serial/stl/stallion.c
sys/dev/sound/pci/cmireg.h
sys/dev/video/ctx/ctxreg.h
sys/emulation/linux/i386/linux.h
sys/kern/kern_checkpoint.c
sys/kern/kern_memio.c
sys/kern/kern_poll.c
sys/net/i4b/layer1/isic/i4b_isic.h
sys/net/sl/if_sl.c
sys/net/vlan/if_vlan_var.h
sys/netgraph/socket/ng_socket.h
sys/netgraph/socket/ng_socketvar.h
sys/netgraph/tty/ng_tty.c
sys/netproto/atalk/ddp.h
sys/netproto/atalk/ddp_var.h
sys/platform/pc32/acpica5/acpi_machdep.c
sys/platform/pc32/apic/apic_abi.c
sys/platform/pc32/apic/apic_ipl.h
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/apic/mpapic.c
sys/platform/pc32/apic/mpapic.h
sys/platform/pc32/apm/apm.c
sys/platform/pc32/i386/autoconf.c
sys/platform/pc32/i386/exception.s
sys/platform/pc32/i386/identcpu.c
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/math_emulate.c
sys/platform/pc32/i386/mem.c
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/i386/nexus.c
sys/platform/pc32/i386/trap.c
sys/platform/pc32/i386/userconfig.c
sys/platform/pc32/i386/vm86.c
sys/platform/pc32/icu/icu.h
sys/platform/pc32/icu/icu_abi.c
sys/platform/pc32/icu/icu_ipl.h
sys/platform/pc32/icu/icu_ipl.s
sys/platform/pc32/icu/icu_vector.s
sys/platform/pc32/include/bus.h
sys/platform/pc32/include/bus_memio.h
sys/platform/pc32/include/bus_pio.h
sys/platform/pc32/include/globaldata.h
sys/platform/pc32/include/ipl.h
sys/platform/pc32/include/lock.h
sys/platform/pc32/include/pcb.h
sys/platform/pc32/include/pcb_ext.h
sys/platform/pc32/include/resource.h
sys/platform/pc32/include/thread.h
sys/platform/pc32/include/uc_device.h
sys/platform/pc32/isa/clock.c
sys/platform/pc32/isa/intr_machdep.c
sys/platform/pc32/isa/intr_machdep.h
sys/platform/pc32/isa/ipl_funcs.c
sys/platform/pc32/isa/npx.c
sys/platform/pc32/isa/prof_machdep.c
sys/sys/elf32.h
sys/sys/elf64.h
sys/sys/elf_common.h
sys/sys/elf_generic.h
sys/sys/timex.h