From 623eaaad7536cc66a27220634cdbd43223e7f993 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Sun, 7 Aug 2016 14:49:22 +0200
Subject: [PATCH 1/8] Clean up some more after the sys/emulation/linux removal.

---
 Makefile_upgrade.inc       | 11 +----------
 etc/mtree/BSD.include.dist |  4 ----
 share/man/man4/aac.4       | 24 ++++++++++++------------
 sys/conf/files             |  4 ----
 sys/config/LINT64          |  5 ++---
 sys/dev/raid/amr/Makefile  |  4 ++--
 6 files changed, 17 insertions(+), 35 deletions(-)

diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc
index 99003b7..c687fed 100644
--- a/Makefile_upgrade.inc
+++ b/Makefile_upgrade.inc
@@ -3116,20 +3116,11 @@ TO_REMOVE+=/usr/share/man/man8/mk-amd-map.8.gz
 TO_REMOVE+=/usr/share/man/man8/wire-test.8.gz
 TO_REMOVE+=/usr/include/varargs.h
 TO_REMOVE+=/usr/include/bus/pci/pcibus.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_emuldata.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_epoll.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_futex.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_ioctl.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_ipc.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_mib.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_signal.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_socket.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_sysproto.h
-TO_REMOVE+=/usr/include/emulation/linux/linux_util.h
 TO_REMOVE+=/usr/share/openssl/man/man3/CMS_set1_signer_certs.3.gz
 TO_REMOVE+=/usr/share/openssl/man/man3/d2i_509_CRL_fp.3.gz
 TO_REMOVE+=/usr/share/openssl/man/man3/EVP_PKEY_ctrl.3.gz
 TO_REMOVE+=/usr/share/openssl/man/man3/EVP_PKEY_ctrl_str.3.gz
+TO_REMOVE+=/usr/include/emulation
 
 .if !defined(WANT_INSTALLER)
 TO_REMOVE+=/usr/sbin/dfuibe_installer
diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist
index 6ecfc3f..860d21c 100644
--- a/etc/mtree/BSD.include.dist
+++ b/etc/mtree/BSD.include.dist
@@ -215,10 +215,6 @@
             ..
         ..
     ..
-    emulation
-        linux
-        ..
-    ..
     gnu
         vfs
             ext2fs
diff --git a/share/man/man4/aac.4 b/share/man/man4/aac.4
index 38ce0a2..b06c1d5 100644
--- a/share/man/man4/aac.4
+++ b/share/man/man4/aac.4
@@ -75,17 +75,17 @@ and
 .Pa /dev/hpn?
 exist for compatibility with the Dell and HP versions of management tools,
 respectively.
-If the kernel is compiled with the
-.Dv COMPAT_LINUX
-option, or the
-.Pa aac_linux.ko
-and
-.Pa linux.ko
-modules are loaded, the
-Linux-compatible
-.Xr ioctl 2
-interface for the management device will be enabled and will allow
-Linux-based management applications to control the card.
+.\"If the kernel is compiled with the
+.\".Dv COMPAT_LINUX
+.\"option, or the
+.\".Pa aac_linux.ko
+.\"and
+.\".Pa linux.ko
+.\"modules are loaded, the
+.\"Linux-compatible
+.\".Xr ioctl 2
+.\"interface for the management device will be enabled and will allow
+.\"Linux-based management applications to control the card.
 .Sh LOADER TUNABLES
 .Bl -tag -width indent
 .It Va hw.aac.msi.enable
@@ -285,7 +285,7 @@ These messages are printed on the system console,
 and are also queued for retrieval by a management application.
 .Sh SEE ALSO
 .Xr kld 4 ,
-.Xr linux 4 ,
+.\".Xr linux 4 ,
 .Xr scsi 4 ,
 .Xr kldload 8
 .Sh HISTORY
diff --git a/sys/conf/files b/sys/conf/files
index ce44e7a..374ae85 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -130,7 +130,6 @@ dev/raid/aac/aac.c			optional aac
 dev/raid/aac/aac_cam.c			optional aacp aac
 dev/raid/aac/aac_debug.c		optional aac
 dev/raid/aac/aac_disk.c			optional aac
-dev/raid/aac/aac_linux.c		optional aac compat_linux
 dev/raid/aac/aac_pci.c			optional aac pci
 dev/raid/arcmsr/arcmsr.c		optional arcmsr pci
 
@@ -181,7 +180,6 @@ dev/disk/nata/atapi-tape.c		optional natapist
 dev/raid/amr/amr.c			optional amr
 dev/raid/amr/amr_cam.c			optional amrp amr
 dev/raid/amr/amr_disk.c			optional amr
-#dev/raid/amr/amr_linux.c		optional amr compat_linux
 dev/raid/amr/amr_pci.c			optional amr pci
 dev/disk/aic/aic.c			optional aic
 dev/disk/aic/aic_pccard.c		optional aic pccard
@@ -827,7 +825,6 @@ dev/misc/ipmi/ipmi_smbus.c	optional ipmi smbus
 dev/misc/ipmi/ipmi_smbios.c	optional ipmi
 dev/misc/ipmi/ipmi_ssif.c	optional ipmi smbus
 dev/misc/ipmi/ipmi_pci.c	optional ipmi pci
-#dev/misc/ipmi/ipmi_linux.c	optional ipmi compat_linux
 dev/misc/led/led.c		standard
 dev/disk/md/md.c		optional md
 dev/raid/mfi/mfi.c		optional mfi
@@ -836,7 +833,6 @@ dev/raid/mfi/mfi_pci.c		optional mfi pci
 dev/raid/mfi/mfi_disk.c		optional mfi
 dev/raid/mfi/mfi_syspd.c	optional mfi
 dev/raid/mfi/mfi_tbolt.c	optional mfi
-dev/raid/mfi/mfi_linux.c	optional mfi compat_linux
 dev/raid/mfi/mfi_cam.c		optional mfip scbus
 miidevs.h				optional miibus \
 	dependency		"$S/tools/miidevs2h.awk $S/dev/netif/mii_layer/miidevs" \
diff --git a/sys/config/LINT64 b/sys/config/LINT64
index 04bf823..db3ef31 100644
--- a/sys/config/LINT64
+++ b/sys/config/LINT64
@@ -62,8 +62,8 @@ maxusers	10
 makeoptions	CONF_CFLAGS=-fno-builtin  #Don't allow use of memcmp, etc.
 #makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
 #makeoptions	KERNEL=foo		#Build kernel "foo" and install "/foo"
-# Only build Linux API modules and plus those parts of the sound system I need.
-#makeoptions	MODULES_OVERRIDE="linux sound/snd sound/pcm"
+# Only build those parts of the sound system I need.
+#makeoptions	MODULES_OVERRIDE="sound/snd sound/pcm"
 #makeoptions	INSTALLSTRIPPED=1
 #makeoptions	INSTALLSTRIPPEDMODULES=1
 
@@ -2244,7 +2244,6 @@ options 	AHC_DUMP_EEPROM
 #options 	BKTR_ALLOC_PAGES=xxx
 options 	CAM_DEBUG_DELAY
 options 	CLUSTERDEBUG
-#options 	COMPAT_LINUX
 options 	DEBUG
 options 	DEBUG_CRIT_SECTIONS
 #options 	DISABLE_PSE
diff --git a/sys/dev/raid/amr/Makefile b/sys/dev/raid/amr/Makefile
index d8aec9f..9cf7b80 100644
--- a/sys/dev/raid/amr/Makefile
+++ b/sys/dev/raid/amr/Makefile
@@ -1,7 +1,5 @@
 # $FreeBSD: src/sys/modules/amr/Makefile,v 1.14 2010/08/23 06:13:29 imp Exp $
 
-SUBDIR= amr_cam
-
 KMOD=	amr
 SRCS=	amr.c amr_pci.c amr_disk.c device_if.h bus_if.h pci_if.h
 SRCS+=	opt_amr.h
@@ -9,4 +7,6 @@ SRCS+=	opt_amr.h
 # Enable a questionable optimisation for newer adapters
 #CFLAGS+= -DAMR_QUARTZ_GOFASTER
 
+SUBDIR= amr_cam
+
 .include <bsd.kmod.mk>
-- 
2.9.2

