summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2000-10-20 07:58:15 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2000-10-20 07:58:15 +0000
commit35e0e5b31144763b2053a8a033be4407987e7e69 (patch)
treef8963c2475693a3974f6608fa6e8c720fa433512
parent341885a9fce84834fe9fe892fa2c577575150417 (diff)
downloadsrc-test-35e0e5b31144763b2053a8a033be4407987e7e69.tar.gz
src-test-35e0e5b31144763b2053a8a033be4407987e7e69.zip
Notes
-rw-r--r--sys/alpha/alpha/autoconf.c2
-rw-r--r--sys/alpha/alpha/db_interface.c2
-rw-r--r--sys/alpha/alpha/interrupt.c2
-rw-r--r--sys/alpha/alpha/ipl_funcs.c4
-rw-r--r--sys/alpha/alpha/mp_machdep.c4
-rw-r--r--sys/alpha/alpha/trap.c3
-rw-r--r--sys/alpha/alpha/vm_machdep.c2
-rw-r--r--sys/alpha/include/smp.h4
-rw-r--r--sys/amd64/amd64/autoconf.c2
-rw-r--r--sys/amd64/amd64/fpu.c2
-rw-r--r--sys/amd64/amd64/mp_machdep.c2
-rw-r--r--sys/amd64/amd64/mptable.c2
-rw-r--r--sys/amd64/amd64/sys_machdep.c2
-rw-r--r--sys/amd64/amd64/trap.c4
-rw-r--r--sys/amd64/include/mptable.h2
-rw-r--r--sys/amd64/isa/npx.c2
-rw-r--r--sys/dev/an/if_an.c2
-rw-r--r--sys/dev/an/if_an_pccard.c2
-rw-r--r--sys/dev/an/if_an_pci.c2
-rw-r--r--sys/dev/dc/dcphy.c2
-rw-r--r--sys/dev/dc/pnphy.c2
-rw-r--r--sys/dev/fxp/if_fxp.c2
-rw-r--r--sys/dev/isp/isp_freebsd.h2
-rw-r--r--sys/dev/mii/dcphy.c2
-rw-r--r--sys/dev/mii/pnphy.c2
-rw-r--r--sys/dev/random/harvest.c2
-rw-r--r--sys/dev/random/yarrow.c2
-rw-r--r--sys/i386/i386/autoconf.c2
-rw-r--r--sys/i386/i386/mp_machdep.c2
-rw-r--r--sys/i386/i386/mptable.c2
-rw-r--r--sys/i386/i386/sys_machdep.c2
-rw-r--r--sys/i386/i386/trap.c4
-rw-r--r--sys/i386/include/mptable.h2
-rw-r--r--sys/i386/isa/npx.c2
-rw-r--r--sys/kern/imgact_elf.c2
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_clock.c4
-rw-r--r--sys/kern/kern_exec.c2
-rw-r--r--sys/kern/kern_exit.c3
-rw-r--r--sys/kern/kern_fork.c3
-rw-r--r--sys/kern/kern_idle.c2
-rw-r--r--sys/kern/kern_intr.c2
-rw-r--r--sys/kern/kern_shutdown.c2
-rw-r--r--sys/kern/kern_sig.c5
-rw-r--r--sys/kern/kern_subr.c3
-rw-r--r--sys/kern/kern_switch.c3
-rw-r--r--sys/kern/kern_threads.c3
-rw-r--r--sys/kern/subr_prof.c2
-rw-r--r--sys/kern/subr_smp.c2
-rw-r--r--sys/kern/subr_trap.c4
-rw-r--r--sys/kern/uipc_mbuf.c2
-rw-r--r--sys/kern/vfs_aio.c2
-rw-r--r--sys/kern/vfs_bio.c3
-rw-r--r--sys/kern/vfs_default.c2
-rw-r--r--sys/kern/vfs_export.c2
-rw-r--r--sys/kern/vfs_extattr.c2
-rw-r--r--sys/kern/vfs_subr.c2
-rw-r--r--sys/kern/vfs_syscalls.c2
-rw-r--r--sys/kern/vfs_vnops.c3
-rw-r--r--sys/pci/if_fxp.c2
-rw-r--r--sys/powerpc/aim/vm_machdep.c2
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c2
-rw-r--r--sys/sys/buf.h2
-rw-r--r--sys/sys/eventhandler.h2
-rw-r--r--sys/sys/lock.h2
-rw-r--r--sys/sys/lockmgr.h2
-rw-r--r--sys/sys/mbuf.h2
-rw-r--r--sys/sys/vnode.h4
68 files changed, 76 insertions, 87 deletions
diff --git a/sys/alpha/alpha/autoconf.c b/sys/alpha/alpha/autoconf.c
index af46cd6e106ee..a875d54e17173 100644
--- a/sys/alpha/alpha/autoconf.c
+++ b/sys/alpha/alpha/autoconf.c
@@ -37,6 +37,7 @@
#include <sys/conf.h>
#include <sys/disklabel.h>
#include <sys/diskslice.h> /* for BASE_SLICE, MAX_SLICES */
+#include <sys/ipl.h>
#include <sys/reboot.h>
#include <sys/kernel.h>
#include <sys/mount.h>
@@ -45,7 +46,6 @@
#include <sys/devicestat.h>
#include <sys/cons.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/cpuconf.h>
#include <machine/rpb.h>
diff --git a/sys/alpha/alpha/db_interface.c b/sys/alpha/alpha/db_interface.c
index 6b47e29318247..aaa80b161ffef 100644
--- a/sys/alpha/alpha/db_interface.c
+++ b/sys/alpha/alpha/db_interface.c
@@ -59,13 +59,13 @@
#include <sys/kernel.h>
#include <sys/cons.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <vm/vm.h>
#include <machine/db_machdep.h>
#include <machine/pal.h>
#include <machine/prom.h>
-#include <machine/mutex.h>
#include <machine/smp.h>
#include <alpha/alpha/db_instruction.h>
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c
index 194b35f2d5c4d..42ea5855be4cd 100644
--- a/sys/alpha/alpha/interrupt.c
+++ b/sys/alpha/alpha/interrupt.c
@@ -49,6 +49,7 @@
#include <sys/ipl.h>
#include <sys/kthread.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/unistd.h>
#include <machine/reg.h>
@@ -56,7 +57,6 @@
#include <machine/cpuconf.h>
#include <machine/bwx.h>
#include <machine/intr.h>
-#include <machine/mutex.h>
#include <machine/rpb.h>
#ifdef EVCNT_COUNTERS
diff --git a/sys/alpha/alpha/ipl_funcs.c b/sys/alpha/alpha/ipl_funcs.c
index b83656e685787..e110c83ebd2ca 100644
--- a/sys/alpha/alpha/ipl_funcs.c
+++ b/sys/alpha/alpha/ipl_funcs.c
@@ -31,13 +31,13 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
+#include <sys/ipl.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/interrupt.h>
-#include <machine/ipl.h>
#include <machine/cpu.h>
#include <machine/globaldata.h>
#include <machine/globals.h>
-#include <machine/mutex.h>
#include <net/netisr.h>
#include "sio.h"
diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c
index 69170fcade3ee..6514229ece3cd 100644
--- a/sys/alpha/alpha/mp_machdep.c
+++ b/sys/alpha/alpha/mp_machdep.c
@@ -28,11 +28,12 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <machine/mutex.h>
+#include <sys/ipl.h>
#include <sys/ktr.h>
#include <sys/proc.h>
#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
@@ -45,7 +46,6 @@
#include <machine/smp.h>
#include <machine/lock.h>
#include <machine/atomic.h>
-#include <machine/ipl.h>
#include <machine/globaldata.h>
#include <machine/pmap.h>
#include <machine/rpb.h>
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c
index 79019bd6fd898..f53fe7c96a94f 100644
--- a/sys/alpha/alpha/trap.c
+++ b/sys/alpha/alpha/trap.c
@@ -35,13 +35,13 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <machine/mutex.h>
#include <sys/ktr.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/exec.h>
#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/vmmeter.h>
#include <sys/sysent.h>
#include <sys/syscall.h>
@@ -60,7 +60,6 @@
#include <machine/pal.h>
#include <machine/fpu.h>
#include <machine/smp.h>
-#include <machine/mutex.h>
#ifdef KTRACE
#include <sys/uio.h>
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index f706590ed3849..c7662917172f7 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -73,6 +73,7 @@
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/buf.h>
+#include <sys/mutex.h>
#include <sys/vnode.h>
#include <sys/vmmeter.h>
#include <sys/kernel.h>
@@ -84,7 +85,6 @@
#include <machine/fpu.h>
#include <machine/md_var.h>
#include <machine/prom.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
diff --git a/sys/alpha/include/smp.h b/sys/alpha/include/smp.h
index 00aec6a955d41..2c208c8c1e638 100644
--- a/sys/alpha/include/smp.h
+++ b/sys/alpha/include/smp.h
@@ -15,9 +15,9 @@
#ifdef _KERNEL
-#include <machine/mutex.h>
-#include <machine/ipl.h>
+#include <sys/ipl.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#ifndef LOCORE
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index 4edda4bdcab51..4ffcd25260b25 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -61,6 +61,7 @@
#include <sys/conf.h>
#include <sys/disklabel.h>
#include <sys/diskslice.h>
+#include <sys/ipl.h>
#include <sys/reboot.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -68,7 +69,6 @@
#include <sys/cons.h>
#include <machine/bootinfo.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#ifdef APIC_IO
#include <machine/smp.h>
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index e53c54cc8a876..2672a639a4763 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -41,6 +41,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
@@ -58,7 +59,6 @@
#endif
#include <machine/cputypes.h>
#include <machine/frame.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
#include <machine/psl.h>
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 803ac250296e1..d09d88204cf1c 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -40,6 +40,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
+#include <sys/ipl.h>
#include <sys/malloc.h>
#include <sys/proc.h>
@@ -52,7 +53,6 @@
#include <sys/user.h>
#include <machine/cpu.h>
-#include <machine/ipl.h>
#include <machine/pcb_ext.h> /* pcb.h included by sys/user.h */
#include <machine/sysarch.h>
#ifdef SMP
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index b9ebb600cb05a..674f77a8a56db 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -53,8 +53,10 @@
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/syscall.h>
@@ -76,9 +78,7 @@
#include <vm/vm_extern.h>
#include <machine/cpu.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/pcb.h>
#ifdef SMP
#include <machine/smp.h>
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index e53c54cc8a876..2672a639a4763 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -41,6 +41,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
@@ -58,7 +59,6 @@
#endif
#include <machine/cputypes.h>
#include <machine/frame.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
#include <machine/psl.h>
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 68a22a2e2e6b4..e557d1f41c5e1 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -107,7 +107,7 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#include <machine/mutex.h>
+#include <sys/mutex.h>
#include <machine/resource.h>
#include <net/if.h>
diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c
index 551bad863d28d..41b667267589d 100644
--- a/sys/dev/an/if_an_pccard.c
+++ b/sys/dev/an/if_an_pccard.c
@@ -55,7 +55,7 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#include <machine/mutex.h>
+#include <sys/mutex.h>
#include <machine/resource.h>
#include <net/if.h>
diff --git a/sys/dev/an/if_an_pci.c b/sys/dev/an/if_an_pci.c
index 22a0443ebdb2e..bde0f3df9c5bf 100644
--- a/sys/dev/an/if_an_pci.c
+++ b/sys/dev/an/if_an_pci.c
@@ -69,7 +69,7 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#include <machine/mutex.h>
+#include <sys/mutex.h>
#include <machine/resource.h>
#include <net/if.h>
diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c
index 285c2d3694c95..e991f0071c1ad 100644
--- a/sys/dev/dc/dcphy.c
+++ b/sys/dev/dc/dcphy.c
@@ -47,6 +47,7 @@
#include <sys/socket.h>
#include <sys/errno.h>
#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/bus.h>
#include <net/if.h>
@@ -60,7 +61,6 @@
#include <machine/bus_pio.h>
#include <machine/bus_memio.h>
#include <machine/bus.h>
-#include <machine/mutex.h>
#include <machine/resource.h>
#include <sys/bus.h>
diff --git a/sys/dev/dc/pnphy.c b/sys/dev/dc/pnphy.c
index e87e0be25e950..786be7ce10ada 100644
--- a/sys/dev/dc/pnphy.c
+++ b/sys/dev/dc/pnphy.c
@@ -45,6 +45,7 @@
#include <sys/socket.h>
#include <sys/errno.h>
#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/bus.h>
#include <net/if.h>
@@ -58,7 +59,6 @@
#include <machine/bus_pio.h>
#include <machine/bus_memio.h>
#include <machine/bus.h>
-#include <machine/mutex.h>
#include <machine/resource.h>
#include <sys/bus.h>
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 3b4afedacdc09..43c30b7070b66 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -38,6 +38,7 @@
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/socket.h>
@@ -56,7 +57,6 @@
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
-#include <machine/mutex.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index c8db280d45bd1..39eed5df4f936 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -40,6 +40,7 @@
#include <sys/kernel.h>
#include <sys/queue.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <machine/bus_memio.h>
@@ -47,7 +48,6 @@
#include <machine/bus.h>
#include <machine/clock.h>
#include <machine/cpu.h>
-#include <machine/mutex.h>
#include <cam/cam.h>
#include <cam/cam_debug.h>
diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c
index 285c2d3694c95..e991f0071c1ad 100644
--- a/sys/dev/mii/dcphy.c
+++ b/sys/dev/mii/dcphy.c
@@ -47,6 +47,7 @@
#include <sys/socket.h>
#include <sys/errno.h>
#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/bus.h>
#include <net/if.h>
@@ -60,7 +61,6 @@
#include <machine/bus_pio.h>
#include <machine/bus_memio.h>
#include <machine/bus.h>
-#include <machine/mutex.h>
#include <machine/resource.h>
#include <sys/bus.h>
diff --git a/sys/dev/mii/pnphy.c b/sys/dev/mii/pnphy.c
index e87e0be25e950..786be7ce10ada 100644
--- a/sys/dev/mii/pnphy.c
+++ b/sys/dev/mii/pnphy.c
@@ -45,6 +45,7 @@
#include <sys/socket.h>
#include <sys/errno.h>
#include <sys/module.h>
+#include <sys/mutex.h>
#include <sys/bus.h>
#include <net/if.h>
@@ -58,7 +59,6 @@
#include <machine/bus_pio.h>
#include <machine/bus_memio.h>
#include <machine/bus.h>
-#include <machine/mutex.h>
#include <machine/resource.h>
#include <sys/bus.h>
diff --git a/sys/dev/random/harvest.c b/sys/dev/random/harvest.c
index 2f9ac2baa0c71..76c23a985108c 100644
--- a/sys/dev/random/harvest.c
+++ b/sys/dev/random/harvest.c
@@ -31,11 +31,11 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/kthread.h>
+#include <sys/mutex.h>
#include <sys/poll.h>
#include <sys/select.h>
#include <sys/random.h>
#include <sys/time.h>
-#include <machine/mutex.h>
#include <crypto/blowfish/blowfish.h>
#include <dev/random/hash.h>
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c
index fe4d160f7e929..004779eb77dac 100644
--- a/sys/dev/random/yarrow.c
+++ b/sys/dev/random/yarrow.c
@@ -37,13 +37,13 @@
#include <sys/kthread.h>
#include <sys/libkern.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/select.h>
#include <sys/random.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/unistd.h>
-#include <machine/mutex.h>
#include <crypto/blowfish/blowfish.h>
#include <dev/random/hash.h>
diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c
index 4edda4bdcab51..4ffcd25260b25 100644
--- a/sys/i386/i386/autoconf.c
+++ b/sys/i386/i386/autoconf.c
@@ -61,6 +61,7 @@
#include <sys/conf.h>
#include <sys/disklabel.h>
#include <sys/diskslice.h>
+#include <sys/ipl.h>
#include <sys/reboot.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -68,7 +69,6 @@
#include <sys/cons.h>
#include <machine/bootinfo.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#ifdef APIC_IO
#include <machine/smp.h>
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index 803ac250296e1..d09d88204cf1c 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -40,6 +40,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
+#include <sys/ipl.h>
#include <sys/malloc.h>
#include <sys/proc.h>
@@ -52,7 +53,6 @@
#include <sys/user.h>
#include <machine/cpu.h>
-#include <machine/ipl.h>
#include <machine/pcb_ext.h> /* pcb.h included by sys/user.h */
#include <machine/sysarch.h>
#ifdef SMP
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index b9ebb600cb05a..674f77a8a56db 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -53,8 +53,10 @@
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/syscall.h>
@@ -76,9 +78,7 @@
#include <vm/vm_extern.h>
#include <machine/cpu.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/pcb.h>
#ifdef SMP
#include <machine/smp.h>
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index e53c54cc8a876..2672a639a4763 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -41,6 +41,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
@@ -58,7 +59,6 @@
#endif
#include <machine/cputypes.h>
#include <machine/frame.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
#include <machine/psl.h>
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 2123b11a24b3e..1ab418168fe3e 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -38,6 +38,7 @@
#include <sys/imgact_elf.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/mman.h>
#include <sys/namei.h>
#include <sys/pioctl.h>
@@ -63,7 +64,6 @@
#include <machine/elf.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#define OLD_EI_BRAND 8
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 0d987758da741..344dac2740682 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -50,6 +50,7 @@
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
@@ -66,7 +67,6 @@
#include <machine/cpu.h>
#include <machine/globals.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 6b3153fc55463..c01b68e838bb6 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -45,7 +45,9 @@
#include <sys/systm.h>
#include <sys/dkstat.h>
#include <sys/callout.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
@@ -58,9 +60,7 @@
#include <sys/sysctl.h>
#include <machine/cpu.h>
-#include <machine/ipl.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include <machine/smp.h>
#ifdef GPROF
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index ab9062b224987..4f74760801c9f 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -32,6 +32,7 @@
#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/filedesc.h>
#include <sys/fcntl.h>
#include <sys/acct.h>
@@ -59,7 +60,6 @@
#include <vm/vm_object.h>
#include <vm/vm_pager.h>
-#include <machine/mutex.h>
#include <machine/reg.h>
MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments");
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index ba8264eaf4519..489633a801f74 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -47,6 +47,7 @@
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
#include <sys/tty.h>
@@ -62,8 +63,6 @@
#include <sys/aio.h>
#include <sys/jail.h>
-#include <machine/mutex.h>
-
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <sys/lock.h>
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index c3699b20d2722..70d883cca900e 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -48,6 +48,7 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/vnode.h>
@@ -66,8 +67,6 @@
#include <sys/user.h>
-#include <machine/mutex.h>
-
static MALLOC_DEFINE(M_ATFORK, "atfork", "atfork callback");
static int fast_vfork = 1;
diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c
index e77fed99fd56d..a24893d3204f2 100644
--- a/sys/kern/kern_idle.c
+++ b/sys/kern/kern_idle.c
@@ -18,6 +18,7 @@
#include <sys/unistd.h>
#include <sys/ipl.h>
#include <sys/kthread.h>
+#include <sys/mutex.h>
#include <sys/queue.h>
#include <sys/eventhandler.h>
#include <vm/vm.h>
@@ -29,7 +30,6 @@
#include <machine/cpu.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/smp.h>
#include <machine/globaldata.h>
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 649e4ccb4239a..40d5f84863960 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -38,12 +38,12 @@
#include <sys/kthread.h>
#include <sys/ktr.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/unistd.h>
#include <sys/vmmeter.h>
#include <machine/atomic.h>
#include <machine/cpu.h>
-#include <machine/mutex.h>
struct swilist {
swihand_t *sl_handler;
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index ed2ce218434f1..431f9660c1dec 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -55,6 +55,7 @@
#include <sys/kernel.h>
#include <sys/kthread.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/queue.h>
#include <sys/sysctl.h>
#include <sys/conf.h>
@@ -64,7 +65,6 @@
#include <machine/pcb.h>
#include <machine/lock.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/smp.h> /* smp_active, cpuid */
#include <sys/signalvar.h>
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index b93277bdcec22..00624d46071da 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -55,6 +55,8 @@
#include <sys/pioctl.h>
#include <sys/acct.h>
#include <sys/fcntl.h>
+#include <sys/ipl.h>
+#include <sys/mutex.h>
#include <sys/wait.h>
#include <sys/ktr.h>
#include <sys/ktrace.h>
@@ -64,10 +66,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
-
-#include <machine/ipl.h>
#include <machine/cpu.h>
-#include <machine/mutex.h>
#include <machine/smp.h>
#define ONSIG 32 /* NSIG for osig* syscalls. XXX. */
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index d321f698f456d..7c5c94afe65b3 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -45,6 +45,7 @@
#include <sys/ktr.h>
#include <sys/proc.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/lock.h>
#include <sys/resourcevar.h>
#include <sys/vnode.h>
@@ -53,8 +54,6 @@
#include <vm/vm_page.h>
#include <vm/vm_map.h>
-#include <machine/mutex.h>
-
static void uio_yield __P((void));
int
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 31c06f90be72f..60024b085baf1 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -30,12 +30,11 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/rtprio.h>
#include <sys/queue.h>
-#include <machine/mutex.h>
-
/*
* We have NQS (32) run queues per scheduling class. For the normal
* class, there are 128 priorities scaled onto these 32 queues. New
diff --git a/sys/kern/kern_threads.c b/sys/kern/kern_threads.c
index ba2b4bf634ecb..e4f0f4e061d57 100644
--- a/sys/kern/kern_threads.c
+++ b/sys/kern/kern_threads.c
@@ -53,12 +53,11 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sysproto.h>
-#include <machine/mutex.h>
-
/*
* Low level support for sleep/wakeup paradigm
* If a timeout is specified:
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c
index 294c649b733b6..51a2b4e5c262e 100644
--- a/sys/kern/subr_prof.c
+++ b/sys/kern/subr_prof.c
@@ -37,12 +37,12 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sysctl.h>
-#include <machine/ipl.h>
#include <machine/cpu.h>
#ifdef GPROF
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 5ef95b3607a79..4788ee47e24f5 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -42,6 +42,7 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/memrange.h>
+#include <sys/mutex.h>
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
@@ -65,7 +66,6 @@
#include <machine/apic.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
-#include <machine/mutex.h>
#include <machine/mpapic.h>
#include <machine/psl.h>
#include <machine/segments.h>
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index b9ebb600cb05a..674f77a8a56db 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -53,8 +53,10 @@
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
+#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
+#include <sys/mutex.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/syscall.h>
@@ -76,9 +78,7 @@
#include <vm/vm_extern.h>
#include <machine/cpu.h>
-#include <machine/ipl.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/pcb.h>
#ifdef SMP
#include <machine/smp.h>
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index d0e8064f8158c..2c52f780053d9 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -39,6 +39,7 @@
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
+#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/domain.h>
@@ -46,7 +47,6 @@
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
-#include <machine/mutex.h>
static void mbinit __P((void *));
SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbinit, NULL)
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index faf7c77493f64..91b2977a927db 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -30,6 +30,7 @@
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/unistd.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
@@ -49,7 +50,6 @@
#include <sys/aio.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include "opt_vfs_aio.h"
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index d9e77cc00c3d8..df91cb53c394a 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -35,6 +35,7 @@
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
#include <sys/ktr.h>
@@ -53,8 +54,6 @@
#include <vm/vm_extern.h>
#include <vm/vm_map.h>
-#include <machine/mutex.h>
-
static MALLOC_DEFINE(M_BIOBUF, "BIO buffer", "BIO buffer");
struct bio_ops bioops; /* I/O operation notification */
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 9bea91699d2d7..fe4c53948d1f5 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -48,12 +48,12 @@
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/poll.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_object.h>
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 27dcfd3f57283..affb16658e787 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -59,6 +59,7 @@
#include <sys/ktr.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/reboot.h>
@@ -69,7 +70,6 @@
#include <sys/vnode.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_object.h>
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index bedad1be51e41..83ca1ca9618b5 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -50,6 +50,7 @@
#include <sys/sysent.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/sysproto.h>
#include <sys/namei.h>
#include <sys/filedesc.h>
@@ -65,7 +66,6 @@
#include <sys/extattr.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include <miscfs/union/union.h>
#include <sys/sysctl.h>
#include <vm/vm.h>
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 27dcfd3f57283..affb16658e787 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -59,6 +59,7 @@
#include <sys/ktr.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/reboot.h>
@@ -69,7 +70,6 @@
#include <sys/vnode.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_object.h>
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index bedad1be51e41..83ca1ca9618b5 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -50,6 +50,7 @@
#include <sys/sysent.h>
#include <sys/malloc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/sysproto.h>
#include <sys/namei.h>
#include <sys/filedesc.h>
@@ -65,7 +66,6 @@
#include <sys/extattr.h>
#include <machine/limits.h>
-#include <machine/mutex.h>
#include <miscfs/union/union.h>
#include <sys/sysctl.h>
#include <vm/vm.h>
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 92874439c4515..e0d7be27c10dd 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -46,6 +46,7 @@
#include <sys/stat.h>
#include <sys/proc.h>
#include <sys/mount.h>
+#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/bio.h>
@@ -54,8 +55,6 @@
#include <sys/ttycom.h>
#include <sys/conf.h>
-#include <machine/mutex.h>
-
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index 3b4afedacdc09..43c30b7070b66 100644
--- a/sys/pci/if_fxp.c
+++ b/sys/pci/if_fxp.c
@@ -38,6 +38,7 @@
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/socket.h>
@@ -56,7 +57,6 @@
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
-#include <machine/mutex.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index f706590ed3849..c7662917172f7 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -73,6 +73,7 @@
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/buf.h>
+#include <sys/mutex.h>
#include <sys/vnode.h>
#include <sys/vmmeter.h>
#include <sys/kernel.h>
@@ -84,7 +85,6 @@
#include <machine/fpu.h>
#include <machine/md_var.h>
#include <machine/prom.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index f706590ed3849..c7662917172f7 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -73,6 +73,7 @@
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/buf.h>
+#include <sys/mutex.h>
#include <sys/vnode.h>
#include <sys/vmmeter.h>
#include <sys/kernel.h>
@@ -84,7 +85,6 @@
#include <machine/fpu.h>
#include <machine/md_var.h>
#include <machine/prom.h>
-#include <machine/mutex.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index 94ae4c11db189..c8d47885a0afc 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -233,7 +233,7 @@ extern struct mtx buftimelock; /* Interlock on setting prio and timo */
extern char *buf_wmesg; /* Default buffer lock message */
#define BUF_WMESG "bufwait"
#include <sys/proc.h> /* XXX for curproc */
-#include <machine/mutex.h>
+#include <sys/mutex.h>
/*
* Initialize a lock.
diff --git a/sys/sys/eventhandler.h b/sys/sys/eventhandler.h
index 3fc4060d2dd67..cf0a605ee1309 100644
--- a/sys/sys/eventhandler.h
+++ b/sys/sys/eventhandler.h
@@ -27,7 +27,7 @@
*/
#include <sys/queue.h>
-#include <machine/mutex.h>
+#include <sys/mutex.h>
#ifndef SYS_EVENTHANDLER_H
#define SYS_EVENTHANDLER_H
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index d11b485f75b76..47afdb2341e63 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -41,8 +41,8 @@
#ifndef _LOCK_H_
#define _LOCK_H_
+#include <sys/mutex.h>
#include <machine/lock.h>
-#include <machine/mutex.h>
/*
* The general lock structure. Provides for multiple shared locks,
diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h
index d11b485f75b76..47afdb2341e63 100644
--- a/sys/sys/lockmgr.h
+++ b/sys/sys/lockmgr.h
@@ -41,8 +41,8 @@
#ifndef _LOCK_H_
#define _LOCK_H_
+#include <sys/mutex.h>
#include <machine/lock.h>
-#include <machine/mutex.h>
/*
* The general lock structure. Provides for multiple shared locks,
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index b8b4e07100a79..0edc0c459a8e3 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -37,7 +37,7 @@
#ifndef _SYS_MBUF_H_
#define _SYS_MBUF_H_
-#include <machine/mutex.h> /* XXX */
+#include <sys/mutex.h> /* XXX */
/*
* Mbufs are of a single size, MSIZE (machine/param.h), which
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 487767e8bd0ae..582d00cb3b1dd 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -38,14 +38,12 @@
#define _SYS_VNODE_H_
#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/queue.h>
#include <sys/select.h>
#include <sys/uio.h>
#include <sys/acl.h>
-#include <machine/lock.h>
-#include <machine/mutex.h>
-
/*
* The vnode is the focus of all file activity in UNIX. There is a
* unique vnode allocated for each active file, each current directory,