aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2018-04-06 17:35:35 +0000
committerBrooks Davis <brooks@FreeBSD.org>2018-04-06 17:35:35 +0000
commit6469bdcdb6a5968dc7edfcfb495d427b4bfdb3dd (patch)
tree91aa218d5c7ba678789e2d491820dfe1e29122b4 /sys
parentd9b41671bfa3cde03ac3795ef8320e718de20086 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/db_trace.c2
-rw-r--r--sys/amd64/amd64/exception.S1
-rw-r--r--sys/amd64/amd64/genassym.c1
-rw-r--r--sys/amd64/amd64/machdep.c1
-rw-r--r--sys/amd64/amd64/ptrace_machdep.c2
-rw-r--r--sys/amd64/amd64/vm_machdep.c1
-rw-r--r--sys/amd64/ia32/ia32_misc.c2
-rw-r--r--sys/amd64/ia32/ia32_reg.c2
-rw-r--r--sys/amd64/ia32/ia32_signal.c2
-rw-r--r--sys/amd64/ia32/ia32_sigtramp.S2
-rw-r--r--sys/amd64/ia32/ia32_syscall.c1
-rw-r--r--sys/amd64/linux/linux_dummy.c2
-rw-r--r--sys/amd64/linux/linux_sysvec.c2
-rw-r--r--sys/amd64/linux32/linux32_dummy.c2
-rw-r--r--sys/amd64/linux32/linux32_machdep.c2
-rw-r--r--sys/amd64/linux32/linux32_sysent.c1
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c1
-rw-r--r--sys/amd64/linux32/syscalls.master1
-rw-r--r--sys/arm/arm/machdep.c1
-rw-r--r--sys/arm/arm/vm_machdep.c2
-rw-r--r--sys/arm64/arm64/machdep.c1
-rw-r--r--sys/cam/scsi/scsi_enc.c2
-rw-r--r--sys/cam/scsi/scsi_pass.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_ioctl.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c1
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c2
-rw-r--r--sys/compat/ia32/ia32_genassym.c2
-rw-r--r--sys/compat/ia32/ia32_sysvec.c2
-rw-r--r--sys/compat/linux/linux_util.c2
-rw-r--r--sys/conf/options20
-rw-r--r--sys/conf/options.amd642
-rw-r--r--sys/conf/options.arm642
-rw-r--r--sys/conf/options.mips2
-rw-r--r--sys/conf/options.powerpc2
-rw-r--r--sys/dev/aac/aac.c1
-rw-r--r--sys/dev/aacraid/aacraid.c1
-rw-r--r--sys/dev/acpica/acpi_hpet.c1
-rw-r--r--sys/dev/atkbdc/atkbd.c1
-rw-r--r--sys/dev/cy/cy.c2
-rw-r--r--sys/dev/drm2/drmP.h1
-rw-r--r--sys/dev/drm2/drm_ioc32.c2
-rw-r--r--sys/dev/drm2/i915/i915_ioc32.c2
-rw-r--r--sys/dev/drm2/radeon/radeon_ioc32.c2
-rw-r--r--sys/dev/filemon/filemon.c2
-rw-r--r--sys/dev/filemon/filemon_wrapper.c2
-rw-r--r--sys/dev/kbdmux/kbdmux.c1
-rw-r--r--sys/dev/md/md.c1
-rw-r--r--sys/dev/mfi/mfi.c1
-rw-r--r--sys/dev/mpr/mpr_user.c2
-rw-r--r--sys/dev/mps/mps_user.c2
-rw-r--r--sys/dev/mrsas/mrsas_linux.c1
-rw-r--r--sys/dev/null/null.c2
-rw-r--r--sys/dev/pci/pci_user.c1
-rw-r--r--sys/dev/rp/rp.c2
-rw-r--r--sys/dev/sio/sio.c1
-rw-r--r--sys/dev/syscons/scvidctl.c1
-rw-r--r--sys/dev/syscons/syscons.c1
-rw-r--r--sys/dev/uart/uart_kbd_sun.c1
-rw-r--r--sys/dev/usb/input/ukbd.c1
-rw-r--r--sys/dev/vkbd/vkbd.c1
-rw-r--r--sys/dev/vt/vt_core.c2
-rw-r--r--sys/fs/cuse/cuse.c2
-rw-r--r--sys/fs/devfs/devfs_devs.c2
-rw-r--r--sys/fs/procfs/procfs_dbregs.c2
-rw-r--r--sys/fs/procfs/procfs_fpregs.c2
-rw-r--r--sys/fs/procfs/procfs_ioctl.c2
-rw-r--r--sys/fs/procfs/procfs_map.c2
-rw-r--r--sys/fs/procfs/procfs_regs.c2
-rw-r--r--sys/geom/geom_dev.c2
-rw-r--r--sys/i386/i386/genassym.c1
-rw-r--r--sys/i386/i386/locore.s1
-rw-r--r--sys/i386/i386/machdep.c1
-rw-r--r--sys/i386/i386/sigtramp.s2
-rw-r--r--sys/i386/linux/linux_dummy.c2
-rw-r--r--sys/kern/imgact_elf.c1
-rw-r--r--sys/kern/init_sysent.c2
-rw-r--r--sys/kern/kern_descrip.c1
-rw-r--r--sys/kern/kern_event.c1
-rw-r--r--sys/kern/kern_exec.c1
-rw-r--r--sys/kern/kern_exit.c1
-rw-r--r--sys/kern/kern_jail.c1
-rw-r--r--sys/kern/kern_mib.c1
-rw-r--r--sys/kern/kern_module.c2
-rw-r--r--sys/kern/kern_proc.c1
-rw-r--r--sys/kern/kern_prot.c1
-rw-r--r--sys/kern/kern_resource.c2
-rw-r--r--sys/kern/kern_sendfile.c2
-rw-r--r--sys/kern/kern_sharedpage.c1
-rw-r--r--sys/kern/kern_sig.c1
-rw-r--r--sys/kern/kern_sysctl.c1
-rw-r--r--sys/kern/kern_tc.c1
-rw-r--r--sys/kern/kern_thr.c1
-rw-r--r--sys/kern/kern_umtx.c1
-rw-r--r--sys/kern/kern_xxx.c2
-rw-r--r--sys/kern/makesyscalls.sh3
-rw-r--r--sys/kern/subr_dummy_vdso_tc.c2
-rw-r--r--sys/kern/sys_generic.c1
-rw-r--r--sys/kern/sys_getrandom.c2
-rw-r--r--sys/kern/sys_pipe.c2
-rw-r--r--sys/kern/sys_process.c2
-rw-r--r--sys/kern/sysv_ipc.c1
-rw-r--r--sys/kern/sysv_msg.c1
-rw-r--r--sys/kern/sysv_sem.c1
-rw-r--r--sys/kern/sysv_shm.c1
-rw-r--r--sys/kern/tty.c1
-rw-r--r--sys/kern/tty_compat.c2
-rw-r--r--sys/kern/uipc_mqueue.c1
-rw-r--r--sys/kern/uipc_sem.c1
-rw-r--r--sys/kern/uipc_socket.c1
-rw-r--r--sys/kern/uipc_syscalls.c1
-rw-r--r--sys/kern/vfs_aio.c2
-rw-r--r--sys/kern/vfs_bio.c1
-rw-r--r--sys/kern/vfs_subr.c1
-rw-r--r--sys/kern/vfs_syscalls.c1
-rw-r--r--sys/mips/include/reg.h4
-rw-r--r--sys/mips/include/sigframe.h4
-rw-r--r--sys/mips/include/tls.h4
-rw-r--r--sys/mips/include/ucontext.h4
-rw-r--r--sys/mips/mips/freebsd32_machdep.c2
-rw-r--r--sys/mips/mips/pm_machdep.c2
-rw-r--r--sys/mips/mips/swtch.S1
-rw-r--r--sys/mips/mips/trap.c1
-rw-r--r--sys/mips/mips/vm_machdep.c1
-rw-r--r--sys/modules/aac/Makefile2
-rw-r--r--sys/modules/aacraid/Makefile2
-rw-r--r--sys/modules/cam/Makefile1
-rw-r--r--sys/modules/cryptodev/Makefile2
-rw-r--r--sys/modules/cuse/Makefile2
-rw-r--r--sys/modules/drm2/drm2/Makefile2
-rw-r--r--sys/modules/drm2/i915kms/Makefile1
-rw-r--r--sys/modules/drm2/radeonkms/Makefile1
-rw-r--r--sys/modules/dtrace/dtrace/Makefile2
-rw-r--r--sys/modules/dtrace/dtraceall/Makefile9
-rw-r--r--sys/modules/dtrace/dtraceall/dtraceall.c1
-rw-r--r--sys/modules/dtrace/fasttrap/Makefile2
-rw-r--r--sys/modules/filemon/Makefile2
-rw-r--r--sys/modules/hyperv/vmbus/Makefile2
-rw-r--r--sys/modules/if_tap/Makefile7
-rw-r--r--sys/modules/isp/Makefile2
-rw-r--r--sys/modules/kbdmux/Makefile5
-rw-r--r--sys/modules/linux/Makefile2
-rw-r--r--sys/modules/linux64/Makefile2
-rw-r--r--sys/modules/linux_common/Makefile2
-rw-r--r--sys/modules/mfi/Makefile2
-rw-r--r--sys/modules/mpr/Makefile2
-rw-r--r--sys/modules/mps/Makefile2
-rw-r--r--sys/modules/mqueue/Makefile2
-rw-r--r--sys/modules/procfs/Makefile13
-rw-r--r--sys/modules/rp/Makefile7
-rw-r--r--sys/modules/sem/Makefile2
-rw-r--r--sys/modules/sgx/Makefile2
-rw-r--r--sys/modules/sio/Makefile7
-rw-r--r--sys/modules/sysvipc/sysvmsg/Makefile2
-rw-r--r--sys/modules/sysvipc/sysvsem/Makefile2
-rw-r--r--sys/modules/sysvipc/sysvshm/Makefile2
-rw-r--r--sys/modules/usb/ukbd/Makefile2
-rw-r--r--sys/modules/vkbd/Makefile5
-rw-r--r--sys/net/bpf.c1
-rw-r--r--sys/net/if.c1
-rw-r--r--sys/net/if_tap.c1
-rw-r--r--sys/net/rtsock.c1
-rw-r--r--sys/netinet/in_jail.c1
-rw-r--r--sys/netinet/in_prot.c1
-rw-r--r--sys/netinet/sctp_os_bsd.h1
-rw-r--r--sys/netinet/sctp_syscalls.c1
-rw-r--r--sys/netinet/tcp_subr.c1
-rw-r--r--sys/netinet6/in6.c1
-rw-r--r--sys/netinet6/in6_jail.c1
-rw-r--r--sys/opencrypto/cryptodev.c2
-rw-r--r--sys/powerpc/aim/aim_machdep.c1
-rw-r--r--sys/powerpc/aim/mmu_oea64.c1
-rw-r--r--sys/powerpc/booke/booke_machdep.c1
-rw-r--r--sys/powerpc/include/reg.h4
-rw-r--r--sys/powerpc/powerpc/exec_machdep.c1
-rw-r--r--sys/powerpc/powerpc/machdep.c1
-rw-r--r--sys/powerpc/powerpc/ptrace_machdep.c2
-rw-r--r--sys/powerpc/powerpc/sys_machdep.c2
-rw-r--r--sys/sparc64/sparc64/exception.S1
-rw-r--r--sys/sparc64/sparc64/machdep.c1
-rw-r--r--sys/vm/swap_pager.c1
-rw-r--r--sys/vm/vm_meter.c2
-rw-r--r--sys/vm/vm_mmap.c1
-rw-r--r--sys/vm/vm_unix.c2
-rw-r--r--sys/x86/x86/cpu_machdep.c1
-rw-r--r--sys/x86/x86/tsc.c1
185 files changed, 44 insertions, 307 deletions
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
index 2f2ab34879f9c..30f345e1012fb 100644
--- a/sys/amd64/amd64/db_trace.c
+++ b/sys/amd64/amd64/db_trace.c
@@ -27,8 +27,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kdb.h>
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S
index 01de24c3a368a..0682a9b82b359 100644
--- a/sys/amd64/amd64/exception.S
+++ b/sys/amd64/amd64/exception.S
@@ -39,7 +39,6 @@
*/
#include "opt_atpic.h"
-#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
#include "assym.inc"
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index cd3ea13f9078b..7b421eaedbd18 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -37,7 +37,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
#include "opt_kstack_pages.h"
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 22cdb3fe6c22e..818ec25043fe1 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -44,7 +44,6 @@
__FBSDID("$FreeBSD$");
#include "opt_atpic.h"
-#include "opt_compat.h"
#include "opt_cpu.h"
#include "opt_ddb.h"
#include "opt_inet.h"
diff --git a/sys/amd64/amd64/ptrace_machdep.c b/sys/amd64/amd64/ptrace_machdep.c
index 10a99e2b3a26b..5a552b03c90c5 100644
--- a/sys/amd64/amd64/ptrace_machdep.c
+++ b/sys/amd64/amd64/ptrace_machdep.c
@@ -30,8 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index cf8879eb8eb1f..c7a18ce067168 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
#include "opt_isa.h"
#include "opt_cpu.h"
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/amd64/ia32/ia32_misc.c b/sys/amd64/ia32/ia32_misc.c
index e2a834816d7d8..6307ede32047f 100644
--- a/sys/amd64/ia32/ia32_misc.c
+++ b/sys/amd64/ia32/ia32_misc.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/proc.h>
diff --git a/sys/amd64/ia32/ia32_reg.c b/sys/amd64/ia32/ia32_reg.c
index e9b5f6427ac3d..093737f7f8e83 100644
--- a/sys/amd64/ia32/ia32_reg.c
+++ b/sys/amd64/ia32/ia32_reg.c
@@ -31,8 +31,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/fcntl.h>
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 8c435acffe9e7..da993a8426757 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -36,8 +36,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/fcntl.h>
diff --git a/sys/amd64/ia32/ia32_sigtramp.S b/sys/amd64/ia32/ia32_sigtramp.S
index 90df90a46e18c..c76852c91b06b 100644
--- a/sys/amd64/ia32/ia32_sigtramp.S
+++ b/sys/amd64/ia32/ia32_sigtramp.S
@@ -26,8 +26,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <machine/asmacros.h>
#include <sys/syscall.h>
diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c
index f5ee91cbf5d70..989f5486213e7 100644
--- a/sys/amd64/ia32/ia32_syscall.c
+++ b/sys/amd64/ia32/ia32_syscall.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
*/
#include "opt_clock.h"
-#include "opt_compat.h"
#include "opt_cpu.h"
#include "opt_isa.h"
diff --git a/sys/amd64/linux/linux_dummy.c b/sys/amd64/linux/linux_dummy.c
index 8a2b856296957..7f53f1b25133f 100644
--- a/sys/amd64/linux/linux_dummy.c
+++ b/sys/amd64/linux/linux_dummy.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/sdt.h>
diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
index 0fadadb4a61ae..be6bc57a59cf1 100644
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -34,8 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#define __ELF_WORD_SIZE 64
#include <sys/param.h>
diff --git a/sys/amd64/linux32/linux32_dummy.c b/sys/amd64/linux32/linux32_dummy.c
index c26623f0b303e..360ec89c166dd 100644
--- a/sys/amd64/linux32/linux32_dummy.c
+++ b/sys/amd64/linux32/linux32_dummy.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/sdt.h>
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index ce06be57e9fac..6e1b946f94d38 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -33,8 +33,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/clock.h>
diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c
index 9995d873336c0..67c95fd02680f 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -5,7 +5,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index f58e7ff168a85..b32d165ce8663 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#ifndef COMPAT_FREEBSD32
#error "Unable to compile Linux-emulator due to missing COMPAT_FREEBSD32 option!"
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index 134cac408aaa5..dc8a1e8e3d8a9 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -26,7 +26,6 @@
; function prototype in sys/sysproto.h. Does add a
; definition to syscall.h besides adding a sysent.
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c
index 1d65b12b5a630..6bd31602f2757 100644
--- a/sys/arm/arm/machdep.c
+++ b/sys/arm/arm/machdep.c
@@ -44,7 +44,6 @@
* Updated : 18/04/01 updated for new wscons
*/
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_platform.h"
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c
index f16c884637c83..6fb2b59d3185e 100644
--- a/sys/arm/arm/vm_machdep.c
+++ b/sys/arm/arm/vm_machdep.c
@@ -42,8 +42,6 @@
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
*/
-#include "opt_compat.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 660115f785365..f6749a8139ec5 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -26,7 +26,6 @@
*/
#include "opt_acpi.h"
-#include "opt_compat.h"
#include "opt_platform.h"
#include "opt_ddb.h"
diff --git a/sys/cam/scsi/scsi_enc.c b/sys/cam/scsi/scsi_enc.c
index 2dcdaadc48377..363f27db5f784 100644
--- a/sys/cam/scsi/scsi_enc.c
+++ b/sys/cam/scsi/scsi_enc.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/conf.h>
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index 296dc54077d09..61a8eeb0c2531 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -30,8 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c
index 793e4b4e58923..4060a797616b0 100644
--- a/sys/compat/freebsd32/freebsd32_ioctl.c
+++ b/sys/compat/freebsd32/freebsd32_ioctl.c
@@ -32,8 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/cdio.h>
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 405b4129f5584..88120966507d3 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ktrace.h"
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index 04ccf3b9396b7..59efd2499c3a6 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -5,8 +5,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
diff --git a/sys/compat/ia32/ia32_genassym.c b/sys/compat/ia32/ia32_genassym.c
index 5462a8b78e670..5a1faae892db6 100644
--- a/sys/compat/ia32/ia32_genassym.c
+++ b/sys/compat/ia32/ia32_genassym.c
@@ -1,8 +1,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/assym.h>
#include <sys/systm.h>
diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c
index 5ad3030d0348c..91a2acf329fde 100644
--- a/sys/compat/ia32/ia32_sysvec.c
+++ b/sys/compat/ia32/ia32_sysvec.c
@@ -30,8 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#define __ELF_WORD_SIZE 32
#include <sys/param.h>
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index 8b6a9261e4acd..3b99a94b8a324 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -34,8 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/fcntl.h>
diff --git a/sys/conf/options b/sys/conf/options
index ff133b370d49b..ecc0457e395bc 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -80,18 +80,18 @@ BOOTVERBOSE opt_global.h
CALLOUT_PROFILING
CAPABILITIES opt_capsicum.h
CAPABILITY_MODE opt_capsicum.h
-COMPAT_43 opt_compat.h
-COMPAT_43TTY opt_compat.h
-COMPAT_FREEBSD4 opt_compat.h
-COMPAT_FREEBSD5 opt_compat.h
-COMPAT_FREEBSD6 opt_compat.h
-COMPAT_FREEBSD7 opt_compat.h
-COMPAT_FREEBSD9 opt_compat.h
-COMPAT_FREEBSD10 opt_compat.h
-COMPAT_FREEBSD11 opt_compat.h
+COMPAT_43 opt_global.h
+COMPAT_43TTY opt_global.h
+COMPAT_FREEBSD4 opt_global.h
+COMPAT_FREEBSD5 opt_global.h
+COMPAT_FREEBSD6 opt_global.h
+COMPAT_FREEBSD7 opt_global.h
+COMPAT_FREEBSD9 opt_global.h
+COMPAT_FREEBSD10 opt_global.h
+COMPAT_FREEBSD11 opt_global.h
COMPAT_CLOUDABI32 opt_dontuse.h
COMPAT_CLOUDABI64 opt_dontuse.h
-COMPAT_LINUXKPI opt_compat.h
+COMPAT_LINUXKPI opt_dontuse.h
COMPILING_LINT opt_global.h
CY_PCI_FASTINTR
DEADLKRES opt_watchdog.h
diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64
index 441f191003f90..6da1dff23b8c2 100644
--- a/sys/conf/options.amd64
+++ b/sys/conf/options.amd64
@@ -14,7 +14,7 @@ PV_STATS opt_pmap.h
# Options for emulators. These should only be used at config time, so
# they are handled like options for static filesystems
# (see src/sys/conf/options), except for broken debugging options.
-COMPAT_FREEBSD32 opt_compat.h
+COMPAT_FREEBSD32 opt_global.h
#IBCS2 opt_dontuse.h
#COMPAT_LINUX opt_dontuse.h
COMPAT_LINUX32 opt_compat.h
diff --git a/sys/conf/options.arm64 b/sys/conf/options.arm64
index 0e8fdf7a1540f..341d8c5f08bd3 100644
--- a/sys/conf/options.arm64
+++ b/sys/conf/options.arm64
@@ -8,7 +8,7 @@ THUNDERX_PASS_1_1_ERRATA opt_global.h
VFP opt_global.h
# Binary compatibility
-COMPAT_FREEBSD32 opt_compat.h
+COMPAT_FREEBSD32 opt_global.h
# EFI Runtime services support
EFIRT opt_efirt.h
diff --git a/sys/conf/options.mips b/sys/conf/options.mips
index 3cbeba9935282..625e86945986a 100644
--- a/sys/conf/options.mips
+++ b/sys/conf/options.mips
@@ -58,7 +58,7 @@ MIPS64EL
MIPS64ELHF
MIPSN32
-COMPAT_FREEBSD32 opt_compat.h
+COMPAT_FREEBSD32 opt_global.h
YAMON opt_global.h
CFE opt_global.h
diff --git a/sys/conf/options.powerpc b/sys/conf/options.powerpc
index e06ffa723af49..2c8c2857453fd 100644
--- a/sys/conf/options.powerpc
+++ b/sys/conf/options.powerpc
@@ -13,7 +13,7 @@ POWERPCSPE
FPU_EMU
-COMPAT_FREEBSD32 opt_compat.h
+COMPAT_FREEBSD32 opt_global.h
GFB_DEBUG opt_gfb.h
GFB_NO_FONT_LOADING opt_gfb.h
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index ed3a410fa6ebe..f7ad605811808 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#define AAC_DRIVERNAME "aac"
#include "opt_aac.h"
-#include "opt_compat.h"
/* #include <stddef.h> */
#include <sys/param.h>
diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c
index 192556440fda1..d3ce34994da30 100644
--- a/sys/dev/aacraid/aacraid.c
+++ b/sys/dev/aacraid/aacraid.c
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#define AAC_DRIVERNAME "aacraid"
#include "opt_aacraid.h"
-#include "opt_compat.h"
/* #include <stddef.h> */
#include <sys/param.h>
diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c
index 053b956817a8a..0736dfa39e95f 100644
--- a/sys/dev/acpica/acpi_hpet.c
+++ b/sys/dev/acpica/acpi_hpet.c
@@ -29,7 +29,6 @@
__FBSDID("$FreeBSD$");
#include "opt_acpi.h"
-#include "opt_compat.h"
#if defined(__amd64__)
#define DEV_APIC
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
index 895d358b3fa3b..7a87e71928baf 100644
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -30,7 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_kbd.h"
#include "opt_atkbd.h"
#include "opt_evdev.h"
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 2d4663bee4928..3d397ae775ccd 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -33,8 +33,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
/*
* TODO:
* Atomic COR change.
diff --git a/sys/dev/drm2/drmP.h b/sys/dev/drm2/drmP.h
index d3f6bfeac1ecd..3af7ad11fa2ee 100644
--- a/sys/dev/drm2/drmP.h
+++ b/sys/dev/drm2/drmP.h
@@ -121,7 +121,6 @@ struct drm_device;
#include <dev/drm2/drm_hashtab.h>
#include <dev/drm2/drm_mm.h>
-#include "opt_compat.h"
#include "opt_drm.h"
#include "opt_syscons.h"
#ifdef DRM_DEBUG
diff --git a/sys/dev/drm2/drm_ioc32.c b/sys/dev/drm2/drm_ioc32.c
index 7bbcd43fc44e4..73e1c940ab0c0 100644
--- a/sys/dev/drm2/drm_ioc32.c
+++ b/sys/dev/drm2/drm_ioc32.c
@@ -25,8 +25,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#ifdef COMPAT_FREEBSD32
#include <dev/drm2/drmP.h>
diff --git a/sys/dev/drm2/i915/i915_ioc32.c b/sys/dev/drm2/i915/i915_ioc32.c
index d9a5184c2ac25..44619ea647df3 100644
--- a/sys/dev/drm2/i915/i915_ioc32.c
+++ b/sys/dev/drm2/i915/i915_ioc32.c
@@ -30,8 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#ifdef COMPAT_FREEBSD32
/** @file i915_ioc32.c
diff --git a/sys/dev/drm2/radeon/radeon_ioc32.c b/sys/dev/drm2/radeon/radeon_ioc32.c
index 89ec8d7390d2e..c517e6e3ee169 100644
--- a/sys/dev/drm2/radeon/radeon_ioc32.c
+++ b/sys/dev/drm2/radeon/radeon_ioc32.c
@@ -31,8 +31,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#ifdef COMPAT_FREEBSD32
#include <dev/drm2/drmP.h>
diff --git a/sys/dev/filemon/filemon.c b/sys/dev/filemon/filemon.c
index 8ae6b55c44c8e..38c4eb3f4a56c 100644
--- a/sys/dev/filemon/filemon.c
+++ b/sys/dev/filemon/filemon.c
@@ -31,8 +31,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/file.h>
#include <sys/systm.h>
diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c
index fbc101afda344..2b742d0dab8b1 100644
--- a/sys/dev/filemon/filemon_wrapper.c
+++ b/sys/dev/filemon/filemon_wrapper.c
@@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sysent.h>
#include <sys/vnode.h>
-#include "opt_compat.h"
-
static eventhandler_tag filemon_exec_tag;
static eventhandler_tag filemon_exit_tag;
static eventhandler_tag filemon_fork_tag;
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c
index 7fee5d96fa46d..4c6381dc850d3 100644
--- a/sys/dev/kbdmux/kbdmux.c
+++ b/sys/dev/kbdmux/kbdmux.c
@@ -33,7 +33,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
#include "opt_evdev.h"
#include "opt_kbd.h"
#include "opt_kbdmux.h"
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index d5908e7716130..be661b2703c7f 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -60,7 +60,6 @@
* From: src/sys/dev/vn/vn.c,v 1.122 2000/12/16 16:06:03
*/
-#include "opt_compat.h"
#include "opt_rootdevname.h"
#include "opt_geom.h"
#include "opt_md.h"
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c
index 3a9872f1b1420..96c63fa3eb615 100644
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -55,7 +55,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_mfi.h"
#include <sys/param.h>
diff --git a/sys/dev/mpr/mpr_user.c b/sys/dev/mpr/mpr_user.c
index 74c2a07b41c70..2c9354d12da38 100644
--- a/sys/dev/mpr/mpr_user.c
+++ b/sys/dev/mpr/mpr_user.c
@@ -63,8 +63,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
/* TODO Move headers to mprvar */
#include <sys/types.h>
#include <sys/param.h>
diff --git a/sys/dev/mps/mps_user.c b/sys/dev/mps/mps_user.c
index a4535d06ab43d..1770df60e1e27 100644
--- a/sys/dev/mps/mps_user.c
+++ b/sys/dev/mps/mps_user.c
@@ -65,8 +65,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
/* TODO Move headers to mpsvar */
#include <sys/types.h>
#include <sys/param.h>
diff --git a/sys/dev/mrsas/mrsas_linux.c b/sys/dev/mrsas/mrsas_linux.c
index 07dfe04da0d2e..1794f977a21d9 100644
--- a/sys/dev/mrsas/mrsas_linux.c
+++ b/sys/dev/mrsas/mrsas_linux.c
@@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_util.h>
#include <dev/mrsas/mrsas.h>
+#undef COMPAT_FREEBSD32
#include <dev/mrsas/mrsas_ioctl.h>
/* There are multiple ioctl number ranges that need to be handled */
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index 923f8791ececd..c11a6fd8a102b 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -32,8 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index 60b76b35f76a2..229ca3a18db21 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -30,7 +30,6 @@
__FBSDID("$FreeBSD$");
#include "opt_bus.h" /* XXX trim includes */
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 71e309625a253..74f08edb18088 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$");
* rp.c - for RocketPort FreeBSD
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/endian.h>
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 7406ad4639144..d5d56fb97ed19 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -35,7 +35,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_gdb.h"
#include "opt_kdb.h"
#include "opt_sio.h"
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 099185363ab6b..78c11817dd925 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -32,7 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_syscons.h"
#include <sys/param.h>
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 2020436d89bff..5d9411a762c4a 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_syscons.h"
#include "opt_splash.h"
#include "opt_ddb.h"
diff --git a/sys/dev/uart/uart_kbd_sun.c b/sys/dev/uart/uart_kbd_sun.c
index 9cc15452f1aaf..dac16188aa1c5 100644
--- a/sys/dev/uart/uart_kbd_sun.c
+++ b/sys/dev/uart/uart_kbd_sun.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_kbd.h"
#include "opt_sunkbd.h"
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 9fb5f353d9db3..072e374ed5dda 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
* HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf
*/
-#include "opt_compat.h"
#include "opt_kbd.h"
#include "opt_ukbd.h"
#include "opt_evdev.h"
diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c
index f6454916368b0..61695fa7725dc 100644
--- a/sys/dev/vkbd/vkbd.c
+++ b/sys/dev/vkbd/vkbd.c
@@ -33,7 +33,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
#include "opt_kbd.h"
#include <sys/param.h>
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 91d48bf81df0c..7fea5c2723edc 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -35,8 +35,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/consio.h>
#include <sys/eventhandler.h>
diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c
index a50633fa5cb46..3cf3d0a204aca 100644
--- a/sys/fs/cuse/cuse.c
+++ b/sys/fs/cuse/cuse.c
@@ -24,8 +24,6 @@
* SUCH DAMAGE.
*/
-#include "opt_compat.h"
-
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index d7624865619ed..7295998279e72 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -30,8 +30,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index 247724bbffbc3..25f6e9565c63a 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -45,8 +45,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c
index e01e1dd6afb7a..cf48dd1706917 100644
--- a/sys/fs/procfs/procfs_fpregs.c
+++ b/sys/fs/procfs/procfs_fpregs.c
@@ -39,8 +39,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
diff --git a/sys/fs/procfs/procfs_ioctl.c b/sys/fs/procfs/procfs_ioctl.c
index d76dbd9b65981..a7ac90d61a100 100644
--- a/sys/fs/procfs/procfs_ioctl.c
+++ b/sys/fs/procfs/procfs_ioctl.c
@@ -30,8 +30,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c
index d6d6fe13d62a0..f62a6ea555eb0 100644
--- a/sys/fs/procfs/procfs_map.c
+++ b/sys/fs/procfs/procfs_map.c
@@ -37,8 +37,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c
index 43383bc2b0942..60e0a38511019 100644
--- a/sys/fs/procfs/procfs_regs.c
+++ b/sys/fs/procfs/procfs_regs.c
@@ -39,8 +39,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 0d441b0acde22..e7c0420d3316c 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -38,8 +38,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index 593efa96d3ae2..6b750416755f6 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -38,7 +38,6 @@
__FBSDID("$FreeBSD$");
#include "opt_apic.h"
-#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
#include "opt_kstack_pages.h"
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 5d2add7a12cf6..dbc5b0c80ba02 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -40,7 +40,6 @@
*/
#include "opt_bootp.h"
-#include "opt_compat.h"
#include "opt_nfsroot.h"
#include "opt_pmap.h"
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index c1862fd7e1583..d4dcc8e98b4d0 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#include "opt_apic.h"
#include "opt_atpic.h"
-#include "opt_compat.h"
#include "opt_cpu.h"
#include "opt_ddb.h"
#include "opt_inet.h"
diff --git a/sys/i386/i386/sigtramp.s b/sys/i386/i386/sigtramp.s
index d0c142761294b..4927d02c7aeea 100644
--- a/sys/i386/i386/sigtramp.s
+++ b/sys/i386/i386/sigtramp.s
@@ -39,8 +39,6 @@
* and many others.
*/
-#include "opt_compat.h"
-
#include <sys/syscall.h>
#include <machine/asmacros.h>
#include <machine/psl.h>
diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c
index 94bcb43f433a1..010220e6935f6 100644
--- a/sys/i386/linux/linux_dummy.c
+++ b/sys/i386/linux/linux_dummy.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/sdt.h>
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index ce07aaab20924..83c9886bee670 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -35,7 +35,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/capsicum.h>
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index 870a9d401cf27..91a3ff497e29b 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -5,8 +5,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index d7ddea6b73460..7dde45285cd49 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -40,7 +40,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_ktrace.h"
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 84ae66b75554c..9d7740d0e7930 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -31,7 +31,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include "opt_kqueue.h"
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index ca1b9798d6c4f..21b25e0148c3e 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -30,7 +30,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
#include "opt_ktrace.h"
#include "opt_vm.h"
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 07b5a1eb611f2..f672a2c735812 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -39,7 +39,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index eb6517d01a558..0c0ef218106b6 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -31,7 +31,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index aca186ef5df0d..ef1cdc3345181 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -40,7 +40,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_posix.h"
#include "opt_config.h"
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index 546a57a5d8c28..5cab5c0d991b2 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -26,8 +26,6 @@
* SUCH DAMAGE.
*/
-#include "opt_compat.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index f124767756e43..bcc07d0325fc5 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_ktrace.h"
#include "opt_kstack_pages.h"
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 754880bfcefd2..68bd541163d49 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -46,7 +46,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 7f2f3d87b4ea8..bed34bf4a7fec 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -39,8 +39,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c
index 913019ca7fbf8..caca1e9adf214 100644
--- a/sys/kern/kern_sendfile.c
+++ b/sys/kern/kern_sendfile.c
@@ -30,8 +30,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/capsicum.h>
diff --git a/sys/kern/kern_sharedpage.c b/sys/kern/kern_sharedpage.c
index ced0bf8ac8a2c..2b1fe70ad3331 100644
--- a/sys/kern/kern_sharedpage.c
+++ b/sys/kern/kern_sharedpage.c
@@ -33,7 +33,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_vm.h"
#include <sys/param.h>
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index fb604c41e2527..6e2f57deebe0b 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -39,7 +39,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index b29eefc15de08..0676db592feec 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -41,7 +41,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index d291bc78fad35..e0b7a03f75106 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -21,7 +21,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ntp.h"
#include "opt_ffclock.h"
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 29523d9a0fa46..c9dd0450876a7 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_posix.h"
#include <sys/param.h>
#include <sys/kernel.h>
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index b7b4f70b104a9..44bd63ad1bd34 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_umtx_profiling.h"
#include <sys/param.h>
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index db66d3ffc540b..9db3b439589a4 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -34,8 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index 2b3d698081684..5ff5f3d81d4c9 100644
--- a/sys/kern/makesyscalls.sh
+++ b/sys/kern/makesyscalls.sh
@@ -656,9 +656,6 @@ sed -e '
END {
printf "\n#define AS(name) (sizeof(struct name) / sizeof(register_t))\n" > sysinc
- if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0 || ncompat7 != 0 || ncompat10 != 0 || ncompat11 != 0)
- printf "#include \"opt_compat.h\"\n\n" > syssw
-
if (ncompat != 0) {
printf "\n#ifdef %s\n", compat > sysinc
printf "#define compat(n, name) n, (sy_call_t *)__CONCAT(o,name)\n" > sysinc
diff --git a/sys/kern/subr_dummy_vdso_tc.c b/sys/kern/subr_dummy_vdso_tc.c
index 79052abad594c..d1ce053e04296 100644
--- a/sys/kern/subr_dummy_vdso_tc.c
+++ b/sys/kern/subr_dummy_vdso_tc.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/vdso.h>
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 6e615aca52214..9ab1b07dbf3e9 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -40,7 +40,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/kern/sys_getrandom.c b/sys/kern/sys_getrandom.c
index f2d51b4c0d92d..67881a342a7bc 100644
--- a/sys/kern/sys_getrandom.c
+++ b/sys/kern/sys_getrandom.c
@@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/limits.h>
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 469f5243635de..6b852c540794c 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -91,8 +91,6 @@
* in the structure may have changed.
*/
-#include "opt_compat.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 1e054c0c8a6db..d693200e1150f 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -34,8 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
diff --git a/sys/kern/sysv_ipc.c b/sys/kern/sysv_ipc.c
index 7e58608d61668..91f69c43e5a97 100644
--- a/sys/kern/sysv_ipc.c
+++ b/sys/kern/sysv_ipc.c
@@ -39,7 +39,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_sysvipc.h"
#include <sys/param.h>
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index ddc534bc1a03e..d9b577a7e16ae 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -58,7 +58,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_sysvipc.h"
#include <sys/param.h>
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 309d1aa57f1cc..8578c311bb82e 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -47,7 +47,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_sysvipc.h"
#include <sys/param.h>
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 24fe9d741bd76..0d9b561d03b54 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -71,7 +71,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_sysvipc.h"
#include <sys/param.h>
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 1c37a20341756..26ce6124bf861 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -33,7 +33,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/capsicum.h>
diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c
index b61e05859f935..b4bf5e95b5244 100644
--- a/sys/kern/tty_compat.c
+++ b/sys/kern/tty_compat.c
@@ -34,8 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
/*
* mapping routines for old line discipline (yuck)
*/
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 0cc7339b4486e..ab07d80b0f1ad 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -54,7 +54,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include <sys/param.h>
#include <sys/kernel.h>
diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c
index 6133666bc4ea0..f2a03f2581b06 100644
--- a/sys/kern/uipc_sem.c
+++ b/sys/kern/uipc_sem.c
@@ -41,7 +41,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_posix.h"
#include <sys/param.h>
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index d920f0f6e5e67..416de462c5b5c 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -107,7 +107,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_compat.h"
#include "opt_sctp.h"
#include <sys/param.h>
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 40df23c9bd0a6..4f1e362155e77 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 4b7c4be1be93a..ced17ca908b77 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -23,8 +23,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 2022289767b27..df48efba4838d 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_extern.h>
#include <vm/vm_map.h>
#include <vm/swap_pager.h>
-#include "opt_compat.h"
#include "opt_swap.h"
static MALLOC_DEFINE(M_BIOBUF, "biobuf", "BIO buffer");
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 9cd55ac47713b..fe958cfbfea29 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -43,7 +43,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_watchdog.h"
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index d28c588ebfd91..861a7033b8805 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -40,7 +40,6 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/mips/include/reg.h b/sys/mips/include/reg.h
index 8b969a9406349..a1f5aa4da23cd 100644
--- a/sys/mips/include/reg.h
+++ b/sys/mips/include/reg.h
@@ -44,10 +44,6 @@
#ifndef _MACHINE_REG_H_
#define _MACHINE_REG_H_
-#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
-#include "opt_compat.h"
-#endif
-
/*
* Location of the users' stored registers relative to ZERO.
* must be visible to assembly code.
diff --git a/sys/mips/include/sigframe.h b/sys/mips/include/sigframe.h
index 03f55bc18ee08..3b9314d8b6e2f 100644
--- a/sys/mips/include/sigframe.h
+++ b/sys/mips/include/sigframe.h
@@ -34,10 +34,6 @@
#ifndef _MACHINE_SIGFRAME_H_
#define _MACHINE_SIGFRAME_H_
-#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
-#include "opt_compat.h"
-#endif
-
/*
* WARNING: code in locore.s assumes the layout shown for sf_signum
* thru sf_addr so... don't alter them!
diff --git a/sys/mips/include/tls.h b/sys/mips/include/tls.h
index e7b80c7478be1..19743d9a7883e 100644
--- a/sys/mips/include/tls.h
+++ b/sys/mips/include/tls.h
@@ -34,10 +34,6 @@
#ifndef __MIPS_TLS_H__
#define __MIPS_TLS_H__
-#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
-#include "opt_compat.h"
-#endif
-
/*
* TLS parameters
*/
diff --git a/sys/mips/include/ucontext.h b/sys/mips/include/ucontext.h
index f08976c773157..06d8d0ed96235 100644
--- a/sys/mips/include/ucontext.h
+++ b/sys/mips/include/ucontext.h
@@ -41,10 +41,6 @@
#ifndef _LOCORE
-#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
-#include "opt_compat.h"
-#endif
-
typedef struct __mcontext {
/*
* These fields must match the corresponding fields in struct
diff --git a/sys/mips/mips/freebsd32_machdep.c b/sys/mips/mips/freebsd32_machdep.c
index 1dd2da066eb17..73c5848029fae 100644
--- a/sys/mips/mips/freebsd32_machdep.c
+++ b/sys/mips/mips/freebsd32_machdep.c
@@ -32,8 +32,6 @@
* Based on nwhitehorn's COMPAT_FREEBSD32 support code for PowerPC64.
*/
-#include "opt_compat.h"
-
#define __ELF_WORD_SIZE 32
#include <sys/types.h>
diff --git a/sys/mips/mips/pm_machdep.c b/sys/mips/mips/pm_machdep.c
index 9c58236baa724..d4571bb634e2e 100644
--- a/sys/mips/mips/pm_machdep.c
+++ b/sys/mips/mips/pm_machdep.c
@@ -40,8 +40,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/mips/mips/swtch.S b/sys/mips/mips/swtch.S
index 93db1fc05a205..c96c52494f1e3 100644
--- a/sys/mips/mips/swtch.S
+++ b/sys/mips/mips/swtch.S
@@ -55,7 +55,6 @@
* assembly language support routines.
*/
-#include "opt_compat.h"
#include <sys/syscall.h>
#include <machine/asm.h>
#include <machine/cpu.h>
diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c
index 5e19c6b6752e7..e373840d1deba 100644
--- a/sys/mips/mips/trap.c
+++ b/sys/mips/mips/trap.c
@@ -43,7 +43,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_ktrace.h"
diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c
index a7b8307ec16d1..47be7a3ee34ef 100644
--- a/sys/mips/mips/vm_machdep.c
+++ b/sys/mips/mips/vm_machdep.c
@@ -43,7 +43,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include <sys/param.h>
diff --git a/sys/modules/aac/Makefile b/sys/modules/aac/Makefile
index 4810d4e141ddd..1a5b433688eea 100644
--- a/sys/modules/aac/Makefile
+++ b/sys/modules/aac/Makefile
@@ -8,7 +8,7 @@ SUBDIR= aac_linux
KMOD= aac
SRCS= aac.c aac_pci.c aac_disk.c aac_cam.c
-SRCS+= opt_scsi.h opt_cam.h opt_compat.h opt_aac.h
+SRCS+= opt_scsi.h opt_cam.h opt_aac.h
SRCS+= device_if.h bus_if.h pci_if.h
# To enable debug output from the driver, uncomment these two lines.
diff --git a/sys/modules/aacraid/Makefile b/sys/modules/aacraid/Makefile
index 2209ead57aa9e..8852d477b7394 100644
--- a/sys/modules/aacraid/Makefile
+++ b/sys/modules/aacraid/Makefile
@@ -8,7 +8,7 @@ SUBDIR= aacraid_linux
KMOD= aacraid
SRCS= aacraid.c aacraid_pci.c aacraid_cam.c
-SRCS+= opt_scsi.h opt_cam.h opt_compat.h opt_aacraid.h
+SRCS+= opt_scsi.h opt_cam.h opt_aacraid.h
SRCS+= device_if.h bus_if.h pci_if.h
# To enable debug output from the driver, uncomment these two lines.
diff --git a/sys/modules/cam/Makefile b/sys/modules/cam/Makefile
index 0e76d69dd0bb2..2ea5812ce6b62 100644
--- a/sys/modules/cam/Makefile
+++ b/sys/modules/cam/Makefile
@@ -8,7 +8,6 @@ KMOD= cam
# See sys/conf/options for the flags that go into the different opt_*.h files.
SRCS= opt_cam.h
-SRCS+= opt_compat.h
SRCS+= opt_ada.h
SRCS+= opt_scsi.h
SRCS+= opt_cd.h
diff --git a/sys/modules/cryptodev/Makefile b/sys/modules/cryptodev/Makefile
index 7497772bb0b62..08bed84125afc 100644
--- a/sys/modules/cryptodev/Makefile
+++ b/sys/modules/cryptodev/Makefile
@@ -3,6 +3,6 @@
.PATH: ${SRCTOP}/sys/opencrypto
KMOD = cryptodev
SRCS = cryptodev.c
-SRCS += bus_if.h device_if.h opt_compat.h
+SRCS += bus_if.h device_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/cuse/Makefile b/sys/modules/cuse/Makefile
index cefd1e03f5869..2775da2a73247 100644
--- a/sys/modules/cuse/Makefile
+++ b/sys/modules/cuse/Makefile
@@ -27,6 +27,6 @@
.PATH: ${SRCTOP}/sys/fs/cuse
KMOD= cuse
-SRCS= cuse.c device_if.h bus_if.h vnode_if.h opt_compat.h
+SRCS= cuse.c device_if.h bus_if.h vnode_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/drm2/drm2/Makefile b/sys/modules/drm2/drm2/Makefile
index f267715af6fb9..d14cbf8e0c34e 100644
--- a/sys/modules/drm2/drm2/Makefile
+++ b/sys/modules/drm2/drm2/Makefile
@@ -53,7 +53,7 @@ SRCS += drm_ioc32.c
.endif
SRCS +=device_if.h bus_if.h pci_if.h device_if.h iicbus_if.h opt_drm.h \
- opt_vm.h opt_compat.h opt_syscons.h
+ opt_vm.h opt_syscons.h
.if ${MACHINE_CPUARCH} == "powerpc"
diff --git a/sys/modules/drm2/i915kms/Makefile b/sys/modules/drm2/i915kms/Makefile
index 79cf8e08a1699..32c19d873040b 100644
--- a/sys/modules/drm2/i915kms/Makefile
+++ b/sys/modules/drm2/i915kms/Makefile
@@ -48,7 +48,6 @@ SRCS += i915_ioc32.c
SRCS += \
opt_acpi.h \
- opt_compat.h \
opt_drm.h \
opt_syscons.h \
acpi_if.h \
diff --git a/sys/modules/drm2/radeonkms/Makefile b/sys/modules/drm2/radeonkms/Makefile
index 68b030cbc8e3e..ef50e70a60de6 100644
--- a/sys/modules/drm2/radeonkms/Makefile
+++ b/sys/modules/drm2/radeonkms/Makefile
@@ -101,7 +101,6 @@ radeon_ioc32= radeon_ioc32.c
SRCS += \
opt_acpi.h \
- opt_compat.h \
opt_drm.h \
opt_syscons.h \
acpi_if.h \
diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile
index 1d603ef0afe8f..2cfb84c431501 100644
--- a/sys/modules/dtrace/dtrace/Makefile
+++ b/sys/modules/dtrace/dtrace/Makefile
@@ -30,7 +30,7 @@ SRCS+= bus_if.h device_if.h vnode_if.h
DPSRCS+= assym.inc
# These are needed for assym.inc
-SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h
+SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h
#This is needed for dtrace.c
SRCS += opensolaris_taskq.c
diff --git a/sys/modules/dtrace/dtraceall/Makefile b/sys/modules/dtrace/dtraceall/Makefile
index cf081b9822dd4..c331a1f53f0b9 100644
--- a/sys/modules/dtrace/dtraceall/Makefile
+++ b/sys/modules/dtrace/dtraceall/Makefile
@@ -3,17 +3,10 @@
SYSDIR?= ${SRCTOP}/sys
KMOD= dtraceall
-SRCS= dtraceall.c opt_compat.h opt_nfs.h
+SRCS= dtraceall.c opt_nfs.h
CFLAGS+= -I${SYSDIR}
-.if !defined(KERNBUILDDIR)
-.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "mips64"
-opt_compat.h:
- echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET}
-.endif
-.endif
-
.include <bsd.kmod.mk>
CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h
diff --git a/sys/modules/dtrace/dtraceall/dtraceall.c b/sys/modules/dtrace/dtraceall/dtraceall.c
index b456d2ae48bf1..7ac25b85d1cc0 100644
--- a/sys/modules/dtrace/dtraceall/dtraceall.c
+++ b/sys/modules/dtrace/dtraceall/dtraceall.c
@@ -34,7 +34,6 @@
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/errno.h>
-#include "opt_compat.h"
#include "opt_nfs.h"
static int
diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile
index 49c0de8c08d38..d1d303cb88568 100644
--- a/sys/modules/dtrace/fasttrap/Makefile
+++ b/sys/modules/dtrace/fasttrap/Makefile
@@ -5,7 +5,7 @@ SYSDIR?= ${SRCTOP}/sys
.PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace
KMOD= fasttrap
-SRCS= fasttrap.c fasttrap_isa.c opt_compat.h
+SRCS= fasttrap.c fasttrap_isa.c
SRCS+= vnode_if.h
CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \
diff --git a/sys/modules/filemon/Makefile b/sys/modules/filemon/Makefile
index b0c7cd3246106..a85b1bd63dab3 100644
--- a/sys/modules/filemon/Makefile
+++ b/sys/modules/filemon/Makefile
@@ -4,6 +4,6 @@
KMOD= filemon
SRCS= ${KMOD}.c
-SRCS+= opt_compat.h vnode_if.h
+SRCS+= vnode_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile
index a9a1ff5b1deef..435106c7e9bd4 100644
--- a/sys/modules/hyperv/vmbus/Makefile
+++ b/sys/modules/hyperv/vmbus/Makefile
@@ -18,7 +18,7 @@ SRCS= hyperv.c \
SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h
# XXX: for assym.inc
-SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h opt_compat.h
+SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= opt_apic.h
.endif
diff --git a/sys/modules/if_tap/Makefile b/sys/modules/if_tap/Makefile
index 854b57a09f64e..0df56f3b105b9 100644
--- a/sys/modules/if_tap/Makefile
+++ b/sys/modules/if_tap/Makefile
@@ -5,11 +5,6 @@
.PATH: ${SRCTOP}/sys/net
KMOD= if_tap
-SRCS= if_tap.c opt_compat.h opt_inet.h vnode_if.h
-
-.if !defined(KERNBUILDDIR)
-opt_compat.h:
- echo "#define COMPAT_FREEBSD6 1" > ${.TARGET}
-.endif
+SRCS= if_tap.c opt_inet.h vnode_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/isp/Makefile b/sys/modules/isp/Makefile
index bb13bdfebc190..d59d54036be67 100644
--- a/sys/modules/isp/Makefile
+++ b/sys/modules/isp/Makefile
@@ -4,7 +4,7 @@
KMOD= isp
SRCS= bus_if.h device_if.h pci_if.h \
- opt_cam.h opt_compat.h opt_ddb.h opt_isp.h \
+ opt_cam.h opt_ddb.h opt_isp.h \
isp.c isp_library.c isp_target.c isp_freebsd.c isp_pci.c
.if ${MACHINE} == sparc64
diff --git a/sys/modules/kbdmux/Makefile b/sys/modules/kbdmux/Makefile
index 079a779a2df90..7ae37b8393479 100644
--- a/sys/modules/kbdmux/Makefile
+++ b/sys/modules/kbdmux/Makefile
@@ -4,13 +4,10 @@
.PATH: ${SRCTOP}/sys/dev/kbdmux
KMOD= kbdmux
-SRCS= kbdmux.c opt_compat.h opt_evdev.h opt_kbd.h opt_kbdmux.h bus_if.h \
+SRCS= kbdmux.c opt_evdev.h opt_kbd.h opt_kbdmux.h bus_if.h \
device_if.h
.if !defined(KERNBUILDDIR)
-opt_compat.h:
- echo "#define COMPAT_FREEBSD6 1" > ${.TARGET}
-
opt_kbd.h:
echo "#define KBD_INSTALL_CDEV 1" > ${.TARGET}
.endif
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index 3cfe8c4905074..4055fcb3c8ad9 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -22,7 +22,7 @@ SRCS= linux_fork.c linux${SFX}_dummy.c linux_file.c linux_event.c \
DPSRCS= assym.inc linux${SFX}_genassym.c
# XXX: for assym.inc
-SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h
+SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= opt_apic.h
.endif
diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
index 88271117ad974..78dbd945a3ecd 100644
--- a/sys/modules/linux64/Makefile
+++ b/sys/modules/linux64/Makefile
@@ -10,7 +10,7 @@ SRCS= linux_fork.c linux_dummy.c linux_file.c linux_event.c \
linux_machdep.c linux_misc.c linux_ptrace.c linux_signal.c \
linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \
linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \
- opt_inet6.h opt_compat.h opt_posix.h opt_usb.h \
+ opt_compat.h opt_inet6.h opt_posix.h opt_usb.h \
vnode_if.h device_if.h bus_if.h \
linux_support.s
DPSRCS= assym.inc linux_genassym.c
diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile
index 87db489fdd9aa..940db596a9fee 100644
--- a/sys/modules/linux_common/Makefile
+++ b/sys/modules/linux_common/Makefile
@@ -5,7 +5,7 @@
KMOD= linux_common
SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \
linux_errno.c \
- linux.c opt_compat.h device_if.h vnode_if.h bus_if.h
+ linux.c device_if.h vnode_if.h bus_if.h
EXPORT_SYMS=
EXPORT_SYMS+= linux_emul_path
diff --git a/sys/modules/mfi/Makefile b/sys/modules/mfi/Makefile
index cfe4aee982682..53f4164add7bc 100644
--- a/sys/modules/mfi/Makefile
+++ b/sys/modules/mfi/Makefile
@@ -10,7 +10,7 @@ SUBDIR+= mfi_linux
KMOD= mfi
SRCS= mfi.c mfi_pci.c mfi_disk.c mfi_debug.c mfi_syspd.c mfi_tbolt.c
-SRCS+= opt_mfi.h opt_cam.h opt_compat.h
+SRCS+= opt_mfi.h opt_cam.h
SRCS+= device_if.h bus_if.h pci_if.h
#CFLAGS += -DMFI_DEBUG
diff --git a/sys/modules/mpr/Makefile b/sys/modules/mpr/Makefile
index 89c1e832fcff5..09830c41a86ea 100644
--- a/sys/modules/mpr/Makefile
+++ b/sys/modules/mpr/Makefile
@@ -5,7 +5,7 @@
KMOD= mpr
SRCS= mpr_pci.c mpr.c mpr_sas.c mpr_table.c mpr_user.c
SRCS+= mpr_config.c mpr_mapping.c mpr_sas_lsi.c
-SRCS+= opt_cam.h opt_compat.h
+SRCS+= opt_cam.h
SRCS+= device_if.h bus_if.h pci_if.h
#CFLAGS += -DMPR_DEBUG
diff --git a/sys/modules/mps/Makefile b/sys/modules/mps/Makefile
index 4ac01dffb3df1..85f450c1defc9 100644
--- a/sys/modules/mps/Makefile
+++ b/sys/modules/mps/Makefile
@@ -5,7 +5,7 @@
KMOD= mps
SRCS= mps_pci.c mps.c mps_sas.c mps_table.c mps_user.c
SRCS+= mps_config.c mps_mapping.c mps_sas_lsi.c
-SRCS+= opt_cam.h opt_compat.h
+SRCS+= opt_cam.h
SRCS+= device_if.h bus_if.h pci_if.h
#CFLAGS += -DMPS_DEBUG
diff --git a/sys/modules/mqueue/Makefile b/sys/modules/mqueue/Makefile
index 9c8bd6d0b39b2..865a543d8c292 100644
--- a/sys/modules/mqueue/Makefile
+++ b/sys/modules/mqueue/Makefile
@@ -5,6 +5,6 @@
KMOD= mqueuefs
SRCS= uipc_mqueue.c \
vnode_if.h \
- opt_posix.h opt_compat.h opt_capsicum.h
+ opt_posix.h opt_capsicum.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/procfs/Makefile b/sys/modules/procfs/Makefile
index baccfae503edb..5a819e2cae4b9 100644
--- a/sys/modules/procfs/Makefile
+++ b/sys/modules/procfs/Makefile
@@ -4,7 +4,6 @@
KMOD= procfs
SRCS=
-SRCS+= opt_compat.h
SRCS+= vnode_if.h
SRCS+= procfs_dbregs.c
SRCS+= procfs_fpregs.c
@@ -27,16 +26,4 @@ EXPORT_SYMS+= procfs_doprocfile
EXPORT_SYMS+= procfs_doprocmem
EXPORT_SYMS+= procfs_notsystem
-.if !defined(KERNBUILDDIR)
-opt_compat.h:
- echo "#define COMPAT_43 1" > ${.TARGET}
- echo "#define COMPAT_FREEBSD4 1" >> ${.TARGET}
- echo "#define COMPAT_FREEBSD5 1" >> ${.TARGET}
- echo "#define COMPAT_FREEBSD6 1" >> ${.TARGET}
-.if ${MACHINE_CPUARCH} == "amd64"
- echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET}
- echo "#define COMPAT_LINUX32 1" >> ${.TARGET}
-.endif
-.endif
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/rp/Makefile b/sys/modules/rp/Makefile
index a766394c568a6..530fc12898ce7 100644
--- a/sys/modules/rp/Makefile
+++ b/sys/modules/rp/Makefile
@@ -3,11 +3,6 @@
.PATH: ${SRCTOP}/sys/dev/rp
KMOD= rp
-SRCS= rp.c rp_pci.c device_if.h bus_if.h pci_if.h opt_compat.h
-
-.if !defined(KERNBUILDDIR)
-opt_compat.h:
- echo "#define COMPAT_43 1" > ${.TARGET}
-.endif
+SRCS= rp.c rp_pci.c device_if.h bus_if.h pci_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/sem/Makefile b/sys/modules/sem/Makefile
index c5457e14e4381..5a541a00cb4cf 100644
--- a/sys/modules/sem/Makefile
+++ b/sys/modules/sem/Makefile
@@ -3,6 +3,6 @@
.PATH: ${SRCTOP}/sys/kern
KMOD= sem
-SRCS= uipc_sem.c opt_compat.h opt_posix.h vnode_if.h
+SRCS= uipc_sem.c opt_posix.h vnode_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/sgx/Makefile b/sys/modules/sgx/Makefile
index ea9481ccc3f8b..7e2a2f87b33a8 100644
--- a/sys/modules/sgx/Makefile
+++ b/sys/modules/sgx/Makefile
@@ -4,7 +4,7 @@
KMOD= sgx
SRCS= sgx.c sgxvar.h sgx_support.S
-SRCS+= opt_compat.h opt_hwpmc_hooks.h opt_kstack_pages.h
+SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h
DPSRCS= assym.inc
sgx_support.o: assym.inc
diff --git a/sys/modules/sio/Makefile b/sys/modules/sio/Makefile
index 5f3c4beb8e837..48fdfc88ebeca 100644
--- a/sys/modules/sio/Makefile
+++ b/sys/modules/sio/Makefile
@@ -4,12 +4,7 @@
KMOD= sio
SRCS= bus_if.h card_if.h device_if.h isa_if.h pci_if.h serdev_if.h \
- opt_compat.h opt_gdb.h opt_kdb.h opt_sio.h \
+ opt_gdb.h opt_kdb.h opt_sio.h \
sio.c sio_isa.c sio_pccard.c sio_pci.c sio_puc.c pccarddevs.h
-.if !defined(KERNBUILDDIR)
-opt_compat.h:
- echo "#define COMPAT_43 1" > ${.TARGET}
-.endif
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/sysvipc/sysvmsg/Makefile b/sys/modules/sysvipc/sysvmsg/Makefile
index c30ecac1f5bd4..8cd9d2008b9a1 100644
--- a/sys/modules/sysvipc/sysvmsg/Makefile
+++ b/sys/modules/sysvipc/sysvmsg/Makefile
@@ -3,6 +3,6 @@
.PATH: ${SRCTOP}/sys/kern
KMOD= sysvmsg
-SRCS= sysv_msg.c opt_sysvipc.h opt_compat.h
+SRCS= sysv_msg.c opt_sysvipc.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/sysvipc/sysvsem/Makefile b/sys/modules/sysvipc/sysvsem/Makefile
index 37d31b22f46bb..186e7ed94f4b2 100644
--- a/sys/modules/sysvipc/sysvsem/Makefile
+++ b/sys/modules/sysvipc/sysvsem/Makefile
@@ -3,6 +3,6 @@
.PATH: ${SRCTOP}/sys/kern
KMOD= sysvsem
-SRCS= sysv_sem.c opt_sysvipc.h opt_compat.h
+SRCS= sysv_sem.c opt_sysvipc.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/sysvipc/sysvshm/Makefile b/sys/modules/sysvipc/sysvshm/Makefile
index 3ca31d602d5cc..672079706587f 100644
--- a/sys/modules/sysvipc/sysvshm/Makefile
+++ b/sys/modules/sysvipc/sysvshm/Makefile
@@ -3,6 +3,6 @@
.PATH: ${SRCTOP}/sys/kern
KMOD= sysvshm
-SRCS= sysv_shm.c opt_sysvipc.h opt_compat.h
+SRCS= sysv_shm.c opt_sysvipc.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/usb/ukbd/Makefile b/sys/modules/usb/ukbd/Makefile
index bbd721a0a5130..e9c4c80d68fbd 100644
--- a/sys/modules/usb/ukbd/Makefile
+++ b/sys/modules/usb/ukbd/Makefile
@@ -30,7 +30,7 @@ S= ${SRCTOP}/sys
.PATH: $S/dev/usb/input
KMOD= ukbd
-SRCS= opt_bus.h opt_compat.h opt_evdev.h opt_kbd.h opt_ukbd.h opt_usb.h \
+SRCS= opt_bus.h opt_evdev.h opt_kbd.h opt_ukbd.h opt_usb.h \
device_if.h bus_if.h usb_if.h usbdevs.h \
ukbd.c
diff --git a/sys/modules/vkbd/Makefile b/sys/modules/vkbd/Makefile
index 250653b4f6cf1..00654c1136ebd 100644
--- a/sys/modules/vkbd/Makefile
+++ b/sys/modules/vkbd/Makefile
@@ -4,12 +4,9 @@
.PATH: ${SRCTOP}/sys/dev/vkbd
KMOD= vkbd
-SRCS= vkbd.c opt_compat.h opt_kbd.h
+SRCS= vkbd.c opt_kbd.h
.if !defined(KERNBUILDDIR)
-opt_compat.h:
- echo "#define COMPAT_FREEBSD6 1" > ${.TARGET}
-
opt_kbd.h:
echo "#define KBD_INSTALL_CDEV 1" > ${.TARGET}
.endif
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 8092965a0d25f..dbf177d52bc15 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -40,7 +40,6 @@
__FBSDID("$FreeBSD$");
#include "opt_bpf.h"
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_netgraph.h"
diff --git a/sys/net/if.c b/sys/net/if.c
index a57bb3b260ccb..b8f13f73620c4 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -32,7 +32,6 @@
* $FreeBSD$
*/
-#include "opt_compat.h"
#include "opt_inet6.h"
#include "opt_inet.h"
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index d28be2eb8771b..f268e07b8a1f4 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -37,7 +37,6 @@
* $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $
*/
-#include "opt_compat.h"
#include "opt_inet.h"
#include <sys/param.h>
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index e21af57b40dec..f294897897fa5 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -31,7 +31,6 @@
* @(#)rtsock.c 8.7 (Berkeley) 10/12/95
* $FreeBSD$
*/
-#include "opt_compat.h"
#include "opt_mpath.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/netinet/in_jail.c b/sys/netinet/in_jail.c
index 998c2d928eb4c..11891b56ecbe6 100644
--- a/sys/netinet/in_jail.c
+++ b/sys/netinet/in_jail.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/netinet/in_prot.c b/sys/netinet/in_prot.c
index 8e685c187c61c..acdf38973bbd7 100644
--- a/sys/netinet/in_prot.c
+++ b/sys/netinet/in_prot.c
@@ -32,7 +32,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h
index 015eddcc07a93..c6e0c1d6fc422 100644
--- a/sys/netinet/sctp_os_bsd.h
+++ b/sys/netinet/sctp_os_bsd.h
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
/*
* includes
*/
-#include "opt_compat.h"
#include "opt_inet6.h"
#include "opt_inet.h"
#include "opt_sctp.h"
diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c
index e0a03d07ce576..058e43d274685 100644
--- a/sys/netinet/sctp_syscalls.c
+++ b/sys/netinet/sctp_syscalls.c
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_sctp.h"
-#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index ee7ec586a9fcd..5ec501ec82fe7 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -34,7 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 7cede0374d6b7..ce1620db01779 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -65,7 +65,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/netinet6/in6_jail.c b/sys/netinet6/in6_jail.c
index 8e0de6615194a..65b397f69bf24 100644
--- a/sys/netinet6/in6_jail.c
+++ b/sys/netinet6/in6_jail.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_inet6.h"
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
index 9843444922716..d0a8e249a63b4 100644
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -41,8 +41,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c
index 0cabc19c90a48..7c69f4c72b74f 100644
--- a/sys/powerpc/aim/aim_machdep.c
+++ b/sys/powerpc/aim/aim_machdep.c
@@ -57,7 +57,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_platform.h"
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 0713e77ad6288..ccaeec7c7770f 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
* correct.
*/
-#include "opt_compat.h"
#include "opt_kstack_pages.h"
#include <sys/param.h>
diff --git a/sys/powerpc/booke/booke_machdep.c b/sys/powerpc/booke/booke_machdep.c
index 18f6ced3685dd..83e0f41efe0da 100644
--- a/sys/powerpc/booke/booke_machdep.c
+++ b/sys/powerpc/booke/booke_machdep.c
@@ -81,7 +81,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_hwpmc_hooks.h"
#include "opt_kstack_pages.h"
diff --git a/sys/powerpc/include/reg.h b/sys/powerpc/include/reg.h
index 0eff51e5451e3..32413566042ea 100644
--- a/sys/powerpc/include/reg.h
+++ b/sys/powerpc/include/reg.h
@@ -4,10 +4,6 @@
#ifndef _POWERPC_REG_H_
#define _POWERPC_REG_H_
-#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
-#include "opt_compat.h"
-#endif
-
/* Must match struct trapframe */
struct reg {
register_t fixreg[32];
diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c
index abbf98220dbd4..d409385427499 100644
--- a/sys/powerpc/powerpc/exec_machdep.c
+++ b/sys/powerpc/powerpc/exec_machdep.c
@@ -59,7 +59,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_fpu_emu.h"
#include <sys/param.h>
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 3cbaa70ced6ba..caf28c8ee8a84 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -57,7 +57,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_platform.h"
diff --git a/sys/powerpc/powerpc/ptrace_machdep.c b/sys/powerpc/powerpc/ptrace_machdep.c
index fed000feb4156..bdfd902168eb7 100644
--- a/sys/powerpc/powerpc/ptrace_machdep.c
+++ b/sys/powerpc/powerpc/ptrace_machdep.c
@@ -28,8 +28,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
diff --git a/sys/powerpc/powerpc/sys_machdep.c b/sys/powerpc/powerpc/sys_machdep.c
index 06421481217a4..9138074ed7c96 100644
--- a/sys/powerpc/powerpc/sys_machdep.c
+++ b/sys/powerpc/powerpc/sys_machdep.c
@@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$");
#include <sys/errno.h>
#include <sys/sysproto.h>
-#include "opt_compat.h"
-
#ifdef COMPAT_FREEBSD32
#include <compat/freebsd32/freebsd32_proto.h>
diff --git a/sys/sparc64/sparc64/exception.S b/sys/sparc64/sparc64/exception.S
index a86c48b68f1c3..1df250173c258 100644
--- a/sys/sparc64/sparc64/exception.S
+++ b/sys/sparc64/sparc64/exception.S
@@ -56,7 +56,6 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 0bb16c77dfb42..888b0e5758cbc 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -40,7 +40,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_ddb.h"
#include "opt_kstack_pages.h"
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 8be514fe60456..9755e6cb06492 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -71,7 +71,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_swap.h"
#include "opt_vm.h"
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c
index 15ea0750f3dca..55d5e85006fa3 100644
--- a/sys/vm/vm_meter.c
+++ b/sys/vm/vm_meter.c
@@ -34,8 +34,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 67d65573490b6..ed7a624be75e8 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -45,7 +45,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_hwpmc_hooks.h"
#include "opt_vm.h"
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
index 5e94884f2e248..a43b950a8a757 100644
--- a/sys/vm/vm_unix.c
+++ b/sys/vm/vm_unix.c
@@ -38,8 +38,6 @@
* @(#)vm_unix.c 8.1 (Berkeley) 6/11/93
*/
-#include "opt_compat.h"
-
/*
* Traditional sbrk/grow interface to VM
*/
diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c
index eaa4a3c9ebb8a..1b8e92e319155 100644
--- a/sys/x86/x86/cpu_machdep.c
+++ b/sys/x86/x86/cpu_machdep.c
@@ -42,7 +42,6 @@
__FBSDID("$FreeBSD$");
#include "opt_atpic.h"
-#include "opt_compat.h"
#include "opt_cpu.h"
#include "opt_ddb.h"
#include "opt_inet.h"
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
index 9ccc0c7662a61..53c5058469fa8 100644
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_compat.h"
#include "opt_clock.h"
#include <sys/param.h>