aboutsummaryrefslogtreecommitdiff
path: root/sys/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile19
-rw-r--r--sys/modules/acpi/Makefile1
-rw-r--r--sys/modules/acpi/acpi_system76/Makefile8
-rw-r--r--sys/modules/amdsmu/Makefile3
-rw-r--r--sys/modules/asmc/Makefile3
-rw-r--r--sys/modules/ath10k/Makefile38
-rw-r--r--sys/modules/ath11k/Makefile71
-rw-r--r--sys/modules/ath12k/Makefile44
-rw-r--r--sys/modules/athk_common/Makefile13
-rw-r--r--sys/modules/brcm80211/Makefile4
-rw-r--r--sys/modules/brcm80211/brcmfmac/Makefile98
-rw-r--r--sys/modules/brcm80211/brcmutil/Makefile28
-rw-r--r--sys/modules/ccp/Makefile3
-rw-r--r--sys/modules/cpufreq/Makefile3
-rw-r--r--sys/modules/dtb/rockchip/Makefile5
-rw-r--r--sys/modules/dtrace/Makefile4
-rw-r--r--sys/modules/dtrace/fasttrap/Makefile2
-rw-r--r--sys/modules/hid/hkbd/Makefile2
-rw-r--r--sys/modules/hwpmc/Makefile4
-rw-r--r--sys/modules/hyperv/pcib/Makefile1
-rw-r--r--sys/modules/irdma/Makefile2
-rw-r--r--sys/modules/iwlwifi/Makefile18
-rw-r--r--sys/modules/le/Makefile12
-rw-r--r--sys/modules/linuxkpi/Makefile2
-rw-r--r--sys/modules/mt76/Makefile6
-rw-r--r--sys/modules/mt76/Makefile.inc41
-rw-r--r--sys/modules/mt76/core/Makefile39
-rw-r--r--sys/modules/mt76/mt7615/Makefile23
-rw-r--r--sys/modules/mt76/mt7915/Makefile35
-rw-r--r--sys/modules/mt76/mt7921/Makefile38
-rw-r--r--sys/modules/mt76/mt7925/Makefile30
-rw-r--r--sys/modules/mt76/mt7996/Makefile31
-rw-r--r--sys/modules/netgraph/netflow/Makefile2
-rw-r--r--sys/modules/netlink/Makefile2
-rw-r--r--sys/modules/qlnx/qlnxe/Makefile1
-rw-r--r--sys/modules/qlnx/qlnxev/Makefile1
-rw-r--r--sys/modules/rtw88/Makefile100
-rw-r--r--sys/modules/rtw89/Makefile77
-rw-r--r--sys/modules/ufshci/Makefile3
-rw-r--r--sys/modules/zfs/Makefile142
-rw-r--r--sys/modules/zfs/zfs_config.h221
-rw-r--r--sys/modules/zfs/zfs_gitrev.h2
42 files changed, 788 insertions, 394 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 538cd7a1f37d..a4100c31ef26 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -214,7 +214,6 @@ SUBDIR= \
khelp \
krpc \
ksyms \
- le \
lge \
libalias \
libiconv \
@@ -357,7 +356,7 @@ SUBDIR= \
${_rtw89} \
rtwn \
rtwn_pci \
- rtwn_usb \
+ ${_rtwn_usb} \
${_rtwnfw} \
${_s3} \
${_safe} \
@@ -412,7 +411,7 @@ SUBDIR= \
${_ufshci} \
uinput \
unionfs \
- usb \
+ ${_usb} \
${_vesa} \
${_vf_i2c} \
virtio \
@@ -711,6 +710,14 @@ SUBDIR+= ktest
SUBDIR+= tests
.endif
+.if ${MK_USB} != "no" || defined(ALL_MODULES)
+_rtwn_usb= rtwn_usb
+_usb= usb
+. if ${MACHINE_CPUARCH} == "amd64"
+_thunderbolt= thunderbolt
+. endif
+.endif
+
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
SUBDIR+= zfs
.endif
@@ -939,10 +946,6 @@ _bcm283x_pwm= bcm283x_pwm
_neta= neta
.endif
-.if ${MACHINE_CPUARCH} == "amd64"
-_thunderbolt= thunderbolt
-.endif
-
.if !(${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 110000)
# LLVM 10 crashes when building if_malo_pci.c, fixed in LLVM11:
# https://bugs.llvm.org/show_bug.cgi?id=44351
@@ -967,7 +970,7 @@ SUBDIR:= ${SUBDIR:N${reject}}
afterinstall: .PHONY
${KLDXREF_CMD} ${DESTDIR}${KMODDIR}
.if defined(NO_ROOT) && defined(METALOG)
- echo ".${DISTBASE}${KMODDIR}/linker.hints type=file mode=0644 uname=root gname=wheel" | \
+ echo ".${DISTBASE}${KMODDIR}/linker.hints type=file uname=root gname=wheel mode=0644" | \
cat -l >> ${METALOG}
.endif
.endif
diff --git a/sys/modules/acpi/Makefile b/sys/modules/acpi/Makefile
index 5040187e906f..265e6bd6cdcb 100644
--- a/sys/modules/acpi/Makefile
+++ b/sys/modules/acpi/Makefile
@@ -9,6 +9,7 @@ SUBDIR= \
acpi_panasonic \
acpi_sbl_wmi \
acpi_sony \
+ acpi_system76 \
acpi_toshiba \
acpi_video \
acpi_wmi \
diff --git a/sys/modules/acpi/acpi_system76/Makefile b/sys/modules/acpi/acpi_system76/Makefile
new file mode 100644
index 000000000000..76bee091dfca
--- /dev/null
+++ b/sys/modules/acpi/acpi_system76/Makefile
@@ -0,0 +1,8 @@
+.PATH: ${SRCTOP}/sys/dev/acpi_support
+
+KMOD= acpi_system76
+CFLAGS+=-I${SRCTOP}/sys/dev/acpi_support
+SRCS= acpi_system76.c opt_acpi.h acpi_if.h device_if.h bus_if.h
+SRCS+= backlight_if.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/amdsmu/Makefile b/sys/modules/amdsmu/Makefile
index 752f57173d61..faeb1b136060 100644
--- a/sys/modules/amdsmu/Makefile
+++ b/sys/modules/amdsmu/Makefile
@@ -9,6 +9,7 @@
KMOD= amdsmu
SRCS= amdsmu.c
-SRCS+= bus_if.h device_if.h pci_if.h
+SRCS+= bus_if.h device_if.h pci_if.h \
+ opt_acpi.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/asmc/Makefile b/sys/modules/asmc/Makefile
index 4ba45a4625d8..17f6c7eec731 100644
--- a/sys/modules/asmc/Makefile
+++ b/sys/modules/asmc/Makefile
@@ -1,6 +1,7 @@
.PATH: ${SRCTOP}/sys/dev/asmc
KMOD= asmc
-SRCS= asmc.c opt_acpi.h opt_asmc.h acpi_if.h bus_if.h device_if.h
+SRCS= asmc.c opt_acpi.h opt_asmc.h
+SRCS+= acpi_if.h backlight_if.h bus_if.h device_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile
index 98df270b6791..2ffa8532ff47 100644
--- a/sys/modules/ath10k/Makefile
+++ b/sys/modules/ath10k/Makefile
@@ -2,8 +2,12 @@ DEVATH10KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath10k
.PATH: ${DEVATH10KDIR}
-WITH_CONFIG_FWLOG= 1
-WITH_LEDS= 0
+# Bus attachments.
+ATH10K_PCI= 1
+ATH10K_USB= 0 # Currently not working again, upstream kaputt.
+
+ATH10K_CONFIG_FWLOG= 1
+ATH10K_LEDS= 0
KMOD= if_ath10k
@@ -12,23 +16,33 @@ SRCS+= htc.c htt.c htt_rx.c htt_tx.c
SRCS+= txrx.c wmi.c wmi-tlv.c
SRCS+= p2p.c swap.c
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(ATH10K_PCI) && ${ATH10K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
SRCS+= pci.c
+.endif
-# Other
-SRCS+= ${LINUXKPI_GENSRCS}
-SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(ATH10K_USB) && ${ATH10K_USB} > 0
+SRCS+= usb.c
+.endif
-.if defined(WITH_CONFIG_FWLOG) && ${WITH_CONFIG_FWLOG} > 0
+.if defined(ATH10K_CONFIG_FWLOG) && ${ATH10K_CONFIG_FWLOG} > 0
SRCS+= fwlog.c
-CFLAGS+= -DCONFIG_FWLOG=${WITH_CONFIG_FWLOG}
+CFLAGS+= -DCONFIG_FWLOG
.endif
-.if defined(WITH_LEDS) && ${WITH_LEDS} > 0
+.if defined(ATH10K_LEDS) && ${ATH10K_LEDS} > 0
CFLAGS+= -DCONFIG_ATH10K_LEDS
SRCS+= leds.c
.endif
-CFLAGS+= -DKBUILD_MODNAME='"ath10k"'
+# Always on for now.
+CFLAGS+= -DCONFIG_ATH10K_DEBUG
+CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
+
+# Other
+SRCS+= ${LINUXKPI_GENSRCS}
+SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
CFLAGS+= -I${DEVATH10KDIR}
CFLAGS+= -I${DEVATH10KDIR}/..
@@ -36,8 +50,7 @@ CFLAGS+= ${LINUXKPI_INCLUDES}
# Helpful after fresh imports.
#CFLAGS+= -ferror-limit=0
-CFLAGS+= -DCONFIG_ATH10K_DEBUG
-
+# TODO: further options and SRCS files.
#CFLAGS+= -DCONFIG_ATH10K_AHB
#CFLAGS+= -DCONFIG_ATH10K_DEBUGFS
#CFLAGS+= -DCONFIG_ATH10K_DFS_CERTIFIED
@@ -51,4 +64,7 @@ CFLAGS+= -DCONFIG_ATH10K_DEBUG
#CFLAGS+= -DCONFIG_PM_SLEEP
#CFLAGS+= -DCONFIG_THERMAL
+CFLAGS+= -DKBUILD_MODNAME='"ath10k"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
.include <bsd.kmod.mk>
diff --git a/sys/modules/ath11k/Makefile b/sys/modules/ath11k/Makefile
index 42aa9b9936cd..b1eb2422cc3d 100644
--- a/sys/modules/ath11k/Makefile
+++ b/sys/modules/ath11k/Makefile
@@ -2,30 +2,70 @@ DEVATH11KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath11k
.PATH: ${DEVATH11KDIR}
-WITH_DEBUGFS= 0 # Does not yet compile
-WITH_CONFIG_PM= 0
+ATH11K_PCI= 1
+ATH11K_AHB= 0
+
+ATH11K_DEBUGFS= 0
+ATH11K_TRACE= 0
+ATH11K_THERMAL= 0
+ATH11K_SPECTRAL= 0
+ATH11K_PM= 0
+ATH11K_DEV_COREDUMP= 0
KMOD= if_ath11k
SRCS+= core.c hal.c hal_tx.c hal_rx.c
SRCS+= wmi.c mac.c reg.c htc.c qmi.c
SRCS+= dp.c dp_tx.c dp_rx.c debug.c
-SRCS+= ce.c peer.c dbring.c hw.c
-SRCS+= coredump.c fw.c p2p.c
+SRCS+= ce.c peer.c dbring.c hw.c pcic.c
+SRCS+= fw.c p2p.c
+
+# PCI
+.if defined(ATH11K_PCI) && ${ATH11K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
+SRCS+= mhi.c pci.c
+CFLAGS+= -DCONFIG_ATH11K_PCI
+.endif
+
+.if defined(ATH11K_AHB) && ${ATH11K_AHB} > 0
+SRCS+= ahb.c
+CFLAGS+= -DCONFIG_ATH11K_AHB
+.endif
-SRCS+= mhi.c pci.c pcic.c
+.if defined(ATH11K_DEBUGFS) && ${ATH11K_DEBUGFS} > 0
+SRCS+= debugfs.c debugfs_htt_stats.c debugfs_sta.c
+CFLAGS+= -DCONFIG_ATH11K_DEBUGFS
+CFLAGS+= -DCONFIG_MAC80211_DEBUGFS
+.endif
+
+.if defined(ATH11K_TRACE) && ${ATH11K_TRACE} > 0
+SRCS+= trace.c
+CFLAGS+= -DCONFIG_ATH11K_TRACING
+.endif
+
+.if defined(ATH11K_THERMAL) && ${ATH11K_THERMAL} > 0
+SRCS+= thermal.c
+CFLAGS+= -DCONFIG_ATH11K_THERMAL
+.endif
-.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0
-CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM}
+.if defined(ATH11K_SPECTRAL) && ${ATH11K_SPECTRAL} > 0
+SRCS+= spectral.c
+CFLAGS+= -DCONFIG_ATH11K_SPECTRAL
+.endif
+
+.if defined(ATH11K_PM) && ${ATH11K_PM} > 0
+CFLAGS+= -DCONFIG_PM
SRCS+= wow.c
.endif
+.if defined(ATH11K_DEV_COREDUMP) && ${ATH11K_DEV_COREDUMP} > 0
+CFLAGS+= -DCONFIG_DEV_COREDUMP
+SRCS+= coredump.c
+.endif
+
# Other
SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
-CFLAGS+= -DKBUILD_MODNAME='"ath11k"'
-
CFLAGS+= -I${DEVATH11KDIR}
CFLAGS+= -I${DEVATH11KDIR}/..
CFLAGS+= ${LINUXKPI_INCLUDES}
@@ -34,16 +74,7 @@ CFLAGS+= ${LINUXKPI_INCLUDES}
CFLAGS+= -DCONFIG_ATH11K_DEBUG
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
-SRCS+= debugfs.c debugfs_htt_stats.c debugfs_sta.c
-CFLAGS+= -DCONFIG_ATH11K_DEBUGFS=${WITH_DEBUGFS}
-CFLAGS+= -DCONFIG_MAC80211_DEBUGFS=${WITH_DEBUGFS}
-.endif
-
-#CFLAGS+= -DCONFIG_ATH11K_SPECTRAL
-#CFLAGS+= -DCONFIG_ATH11K_TRACING
-#CFLAGS+= -DCONFIG_NL80211_TESTMODE
-#CFLAGS+= -DCONFIG_PM
-#CFLAGS+= -DCONFIG_THERMAL
+CFLAGS+= -DKBUILD_MODNAME='"ath11k"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
.include <bsd.kmod.mk>
diff --git a/sys/modules/ath12k/Makefile b/sys/modules/ath12k/Makefile
index 674a68e12813..018504812995 100644
--- a/sys/modules/ath12k/Makefile
+++ b/sys/modules/ath12k/Makefile
@@ -2,28 +2,57 @@ DEVATH12KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath12k
.PATH: ${DEVATH12KDIR}
-WITH_CONFIG_ATH12K_TRACING= 0
+ATH12K_PCI= 1
+ATH12K_AHB= 0
+
+ATH12K_ACPI= 0
+ATH12K_COREDUMP= 0
+ATH12K_DEBUGFS= 0
+ATH12K_PM= 0
+ATH12K_TRACING= 0
KMOD= if_ath12k
SRCS+= core.c hal.c hal_tx.c hal_rx.c
SRCS+= wmi.c mac.c reg.c htc.c qmi.c
SRCS+= dp.c dp_tx.c dp_rx.c dp_mon.c debug.c
-SRCS+= ce.c peer.c dbring.c hw.c
+SRCS+= ce.c peer.c dbring.c hw.c fw.c p2p.c
+.if defined(ATH12K_PCI) && ${ATH12K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
SRCS+= mhi.c pci.c
+.else
+.error ath12k requires PCI support compiled in at this point
+.endif
-.if defined(WITH_CONFIG_ATH12K_TRACING) && ${WITH_CONFIG_ATH12K_TRACING} > 0
-CFLAGS+= -DCONFIG_ATH12K_TRACING=${WITH_CONFIG_ATH12K_TRACING}
+.if defined(ATH12K_AHB) && ${ATH12K_AHB} > 0
+CFLAGS+= -DCONFIG_ATH12K_AHB
+SRCS+= ahb.c
+.endif
+.if defined(ATH12K_DEBUGFS) && ${ATH12K_DEBUGFS} > 0
+CFLAGS+= -DCONFIG_ATH12K_DEBUGFS
+SRCS+= debugfs.c debugfs_htt_stats.c debugfs_sta.c
+.endif
+.if defined(ATH12K_ACPI) && ${ATH12K_ACPI} > 0
+CFLAGS+= -DCONFIG_ATH12K_ACPI
+SRCS+= acpi.c
+.endif
+.if defined(ATH12K_TRACING) && ${ATH12K_TRACING} > 0
+CFLAGS+= -DCONFIG_ATH12K_TRACING
SRCS+= trace.c
.endif
+.if defined(ATH12K_PM) && ${ATH12K_PM} > 0
+CFLAGS+= -DCONFIG_PM
+SRCS+= wow.c
+.endif
+.if defined(ATH12K_COREDUMP) && ${ATH12K_COREDUMP} > 0
+CFLAGS+= -DCONFIG_ATH12K_COREDUMP
+SRCS+= coredump.c
+.endif
# Other
SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
-CFLAGS+= -DKBUILD_MODNAME='"ath12k"'
-
CFLAGS+= -I${DEVATH12KDIR}
CFLAGS+= -I${DEVATH12KDIR}/..
CFLAGS+= ${LINUXKPI_INCLUDES}
@@ -32,4 +61,7 @@ CFLAGS+= ${LINUXKPI_INCLUDES}
CFLAGS+= -DCONFIG_ATH12K_DEBUG
+CFLAGS+= -DKBUILD_MODNAME='"ath12k"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
.include <bsd.kmod.mk>
diff --git a/sys/modules/athk_common/Makefile b/sys/modules/athk_common/Makefile
index 5400cfa7723d..d058d19cbe80 100644
--- a/sys/modules/athk_common/Makefile
+++ b/sys/modules/athk_common/Makefile
@@ -4,19 +4,19 @@ DEVDIR= ${SRCTOP}/sys/contrib/dev/athk
KMOD= athk_common
-WITH_ATH_DEBUG= 1
-WITH_ATH_TRACEPOINTS= 0
+ATHK_COMMON_ATH_DEBUG= 1
+ATHK_COMMON_ATH_TRACEPOINTS= 0
SRCS= main.c
SRCS+= dfs_pattern_detector.c dfs_pri_detector.c
SRCS+= hw.c key.c regd.c
-.if defined(WITH_ATH_DEBUG) && ${WITH_ATH_DEBUG} > 0
+.if defined(ATHK_COMMON_ATH_DEBUG) && ${ATHK_COMMON_ATH_DEBUG} > 0
SRCS+= debug.c
CFLAGS+= -DCONFIG_ATH_DEBUG
.endif
-.if defined(WITH_ATH_TRACEPOINTS) && ${WITH_ATH_TRACEPOINTS} > 0
+.if defined(ATHK_COMMON_ATH_TRACEPOINTS) && ${ATHK_COMMON_ATH_TRACEPOINTS} > 0
SRCS+= trace.c
CFLAGS+= -DCONFIG_ATH_TRACEPOINTS
.endif
@@ -25,11 +25,12 @@ CFLAGS+= -DCONFIG_ATH_TRACEPOINTS
SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
-CFLAGS+= -DKBUILD_MODNAME='"athk_common"'
-
CFLAGS+= -I${DEVDIR}
CFLAGS+= ${LINUXKPI_INCLUDES}
# Helpful after fresh imports.
#CFLAGS+= -ferror-limit=0
+CFLAGS+= -DKBUILD_MODNAME='"athk_common"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
.include <bsd.kmod.mk>
diff --git a/sys/modules/brcm80211/Makefile b/sys/modules/brcm80211/Makefile
new file mode 100644
index 000000000000..ac7955c1c0f6
--- /dev/null
+++ b/sys/modules/brcm80211/Makefile
@@ -0,0 +1,4 @@
+SUBDIR= brcmfmac
+SUBDIR+= brcmutil
+
+.include <bsd.subdir.mk>
diff --git a/sys/modules/brcm80211/brcmfmac/Makefile b/sys/modules/brcm80211/brcmfmac/Makefile
new file mode 100644
index 000000000000..107914c2dc27
--- /dev/null
+++ b/sys/modules/brcm80211/brcmfmac/Makefile
@@ -0,0 +1,98 @@
+DEVDIR= ${SRCTOP}/sys/contrib/dev/broadcom/brcm80211/brcmfmac
+
+.PATH: ${DEVDIR}
+
+# Should split this up into a core driver and 3 more
+BRCMFMAC_PCI= 1
+BRCMFMAC_USB= 0
+BRCMFMAC_SDIO= 0
+
+BRCMFMAC_PROTO_BCDC= 0 # SDIO, USB -- do not set manually
+BRCMFMAC_DEBUG= 1
+BRCMFMAC_TRACING= 0 # ftrace probes; simple enough to change possibly; keep 0!
+BRCMFMAC_OF= 0
+BRCMFMAC_DMI= 0
+BRCMFMAC_ACPI= 0
+
+KMOD= if_brcmfmac
+
+SRCS= core.c
+SRCS+= btcoex.c cfg80211.c chip.c common.c feature.c firmware.c
+SRCS+= fweh.c fwil.c fwvid.c p2p.c pno.c proto.c vendor.c xtlv.c
+
+SRCS+= wcc/core.c cyw/core.c bca/core.c
+
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(BRCMFMAC_PCI) && ${BRCMFMAC_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
+SRCS+= pcie.c
+CFLAGS+= -DCONFIG_BRCMFMAC_PCIE
+SRCS+= msgbuf.c commonring.c flowring.c
+CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_MSGBUF
+.endif
+
+# SDIO parts; SDIO depends on an MMCCAM kernel.
+.if defined(BRCMFMAC_SDIO) && ${BRCMFMAC_SDIO} > 0 && ${KERN_OPTS:MMMCCAM}
+SRCS+= sdio.c bcmsdh.c
+SRCS+= sdio_if.h
+SRCS+= sdiodevs.h
+CFLAGS+= -DCONFIG_BRCMFMAC_SDIO
+BRCMFMAC_PROTO_BCDC= 1
+.endif
+
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(BRCMFMAC_USB) && ${BRCMFMAC_USB} > 0
+SRCS+= usb.c
+CFLAGS+= -DCONFIG_BRCMFMAC_USB
+BRCMFMAC_PROTO_BCDC= 1
+.endif
+
+.if defined(BRCMFMAC_PROTO_BCDC) && ${BRCMFMAC_PROTO_BCDC} > 0
+CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_BCDC
+SRCS+= bcdc.c fwsignal.c
+.endif
+
+.if defined(BRCMFMAC_DEBUG) && ${BRCMFMAC_DEBUG} > 0
+CFLAGS+= -DDEBUG -DCONFIG_BRCMDBG
+SRCS+= debug.c
+.endif
+
+.if defined(BRCMFMAC_TRACING) && ${BRCMFMAC_TRACING} > 0
+SRCS+= tracepoint.c
+CFLAGS+= -DCONFIG_BRCM_TRACING
+.endif
+
+.if defined(BRCMFMAC_OF) && ${BRCMFMAC_OF} > 0
+SRCS+= of.c
+CFLAGS+= -DCONFIG_OF
+.endif
+
+.if defined(BRCMFMAC_DMI) && ${BRCMFMAC_DMI} > 0
+SRCS+= dmi.c
+CFLAGS+= -DCONFIG_DMI
+.endif
+
+.if defined(BRCMFMAC_ACPI) && ${BRCMFMAC_ACPI} > 0
+SRCS+= acpi.c
+CFLAGS+= -DCONFIG_ACPI
+.endif
+
+# Other
+SRCS+= bus_if.h device_if.h pci_if.h vnode_if.h
+SRCS+= ${LINUXKPI_GENSRCS}
+SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
+
+CFLAGS+= -I${DEVDIR}
+CFLAGS+= -I${DEVDIR}/../include
+CFLAGS+= ${LINUXKPI_INCLUDES}
+# Helpful after fresh imports.
+#CFLAGS+= -ferror-limit=0
+
+#CFLAGS+= -DCONFIG_PM_SLEEP=
+
+#CFLAGS+= -DCONFIG_PM
+#CFLAGS+= -DCONFIG_IPV6=0
+
+CFLAGS+= -DKBUILD_MODNAME='"brcmfmac"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/brcm80211/brcmutil/Makefile b/sys/modules/brcm80211/brcmutil/Makefile
new file mode 100644
index 000000000000..7ef89be18bf9
--- /dev/null
+++ b/sys/modules/brcm80211/brcmutil/Makefile
@@ -0,0 +1,28 @@
+DEVDIR= ${SRCTOP}/sys/contrib/dev/broadcom/brcm80211/brcmutil
+
+.PATH: ${DEVDIR}
+
+BRCMUTIL_DEBUG= 1
+
+KMOD= brcmutil
+
+SRCS= d11.c utils.c
+
+.if defined(BRCMUTIL_DEBUG) && ${BRCMUTIL_DEBUG} > 0
+CFLAGS+= -DDEBUG
+.endif
+
+# Other
+SRCS+= ${LINUXKPI_GENSRCS}
+SRCS+= bus_if.h device_if.h pci_if.h vnode_if.h
+SRCS+= opt_wlan.h opt_inet6.h opt_inet.h
+
+CFLAGS+= -I${DEVDIR}
+CFLAGS+= -I${DEVDIR}/../include
+CFLAGS+= ${LINUXKPI_INCLUDES}
+#CFLAGS+= -ferror-limit=0
+
+CFLAGS+= -DKBUILD_MODNAME='"brcmutil"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/ccp/Makefile b/sys/modules/ccp/Makefile
index d268f0b58a91..9ab5f524b35c 100644
--- a/sys/modules/ccp/Makefile
+++ b/sys/modules/ccp/Makefile
@@ -10,9 +10,6 @@ SRCS+= device_if.h
SRCS+= cryptodev_if.h
SRCS+= pci_if.h
-CFLAGS+= -fms-extensions
-CFLAGS.clang+= -Wno-microsoft-anon-tag
-
MFILES= kern/bus_if.m kern/device_if.m opencrypto/cryptodev_if.m \
dev/pci/pci_if.m
diff --git a/sys/modules/cpufreq/Makefile b/sys/modules/cpufreq/Makefile
index 9a417f72fc27..23b4c97f5393 100644
--- a/sys/modules/cpufreq/Makefile
+++ b/sys/modules/cpufreq/Makefile
@@ -9,7 +9,8 @@ SRCS+= bus_if.h cpufreq_if.h device_if.h pci_if.h
.PATH: ${SRCTOP}/sys/x86/cpufreq
SRCS+= acpi_if.h opt_acpi.h
-SRCS+= est.c hwpstate_amd.c p4tcc.c powernow.c hwpstate_intel.c
+SRCS+= est.c p4tcc.c powernow.c
+SRCS+= hwpstate_amd.c hwpstate_common.c hwpstate_intel.c
.endif
.if ${MACHINE} == "i386"
diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile
index 9c8ca1acc837..fb29f4f0970a 100644
--- a/sys/modules/dtb/rockchip/Makefile
+++ b/sys/modules/dtb/rockchip/Makefile
@@ -22,7 +22,10 @@ DTS= \
rockchip/rk3568-nanopi-r5s.dts \
rockchip/rk3566-radxa-zero-3e.dts \
rockchip/rk3566-radxa-zero-3w.dts \
- rockchip/rk3568-bpi-r2-pro.dts
+ rockchip/rk3568-bpi-r2-pro.dts \
+ rockchip/rk3588-rock-5-itx.dts \
+ rockchip/rk3588-rock-5b.dts \
+ rockchip/rk3588-orangepi-5-plus
DTSO= rk3328-analog-sound.dtso \
rk3328-i2c0.dtso \
diff --git a/sys/modules/dtrace/Makefile b/sys/modules/dtrace/Makefile
index 3a3769b8b4b5..019b5e951dcf 100644
--- a/sys/modules/dtrace/Makefile
+++ b/sys/modules/dtrace/Makefile
@@ -9,6 +9,7 @@ SUBDIR= dtaudit \
fbt \
profile \
prototype \
+ sdt \
systrace
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
@@ -31,8 +32,5 @@ SUBDIR+= fasttrap
SUBDIR+= systrace_freebsd32
.endif
.endif
-.if ${MACHINE_CPUARCH} != "powerpc" || ${MACHINE_ARCH} == "powerpc64"
-SUBDIR+= sdt
-.endif
.include <bsd.subdir.mk>
diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile
index af0cace6c5a9..334c1765a606 100644
--- a/sys/modules/dtrace/fasttrap/Makefile
+++ b/sys/modules/dtrace/fasttrap/Makefile
@@ -17,7 +17,7 @@ CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/powerpc
.PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/powerpc/dtrace
.endif
-.PATH: ${SYSDIR}/contrib/openzfs/module/unicode
+.PATH: ${SYSDIR}/contrib/openzfs/module/zfs
SRCS+= u8_textprep.c
.include <bsd.kmod.mk>
diff --git a/sys/modules/hid/hkbd/Makefile b/sys/modules/hid/hkbd/Makefile
index 42b5d69dda9e..82f6599cca1d 100644
--- a/sys/modules/hid/hkbd/Makefile
+++ b/sys/modules/hid/hkbd/Makefile
@@ -3,6 +3,6 @@
KMOD= hkbd
SRCS= hkbd.c
SRCS+= opt_hid.h opt_evdev.h opt_kbd.h opt_hkbd.h
-SRCS+= bus_if.h device_if.h
+SRCS+= bus_if.h device_if.h usbdevs.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/hwpmc/Makefile b/sys/modules/hwpmc/Makefile
index 812e3fbf182c..d13f52009600 100644
--- a/sys/modules/hwpmc/Makefile
+++ b/sys/modules/hwpmc/Makefile
@@ -16,7 +16,7 @@ SRCS.DEV_ACPI+= hwpmc_dmc620.c pmu_dmc620.c
.endif
.if ${MACHINE_CPUARCH} == "amd64"
-SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_tsc.c
+SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_ibs.c hwpmc_intel.c hwpmc_tsc.c
SRCS+= hwpmc_x86.c hwpmc_uncore.c
.endif
@@ -29,7 +29,7 @@ SRCS+= hwpmc_armv7.c
.endif
.if ${MACHINE_CPUARCH} == "i386"
-SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c
+SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_ibs.c hwpmc_intel.c
SRCS+= hwpmc_tsc.c hwpmc_x86.c hwpmc_uncore.c
.endif
diff --git a/sys/modules/hyperv/pcib/Makefile b/sys/modules/hyperv/pcib/Makefile
index be0a905aab80..aa2566461d03 100644
--- a/sys/modules/hyperv/pcib/Makefile
+++ b/sys/modules/hyperv/pcib/Makefile
@@ -4,6 +4,7 @@
KMOD= vmbus_pcib
SRCS= vmbus_pcib.c
SRCS+= bus_if.h device_if.h pci_if.h pcib_if.h vmbus_if.h
+SRCS+= opt_acpi.h
CFLAGS+= -I${SRCTOP}/sys/dev/hyperv/pcib
diff --git a/sys/modules/irdma/Makefile b/sys/modules/irdma/Makefile
index a9ef6e63d3f2..8377e2da57a0 100644
--- a/sys/modules/irdma/Makefile
+++ b/sys/modules/irdma/Makefile
@@ -8,7 +8,7 @@ KMOD= irdma
SRCS= icrdma.c
SRCS+= fbsd_kcompat.c irdma_hw.c irdma_verbs.c irdma_utils.c
SRCS+= irdma_cm.c irdma_kcompat.c
-SRCS+= irdma_if.h irdma_di_if.h ice_rdma.h vnode_if.h device_if.h bus_if.h opt_inet.h pci_if.h opt_inet6.h
+SRCS+= irdma_if.h irdma_di_if.h ice_rdma.h vnode_if.h device_if.h bus_if.h opt_inet.h pci_if.h opt_inet6.h opt_wlan.h
# Shared source
SRCS+= irdma_ctrl.c irdma_hmc.c icrdma_hw.c irdma_pble.c irdma_puda.c irdma_uda.c irdma_uk.c irdma_ws.c
diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile
index b5441744d77a..399e35b79d61 100644
--- a/sys/modules/iwlwifi/Makefile
+++ b/sys/modules/iwlwifi/Makefile
@@ -4,10 +4,10 @@ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi
.PATH: ${DEVIWLWIFIDIR}
-WITH_CONFIG_PM= 0
-WITH_DEBUGFS= 0
+IWLWIFI_CONFIG_PM= 0
+IWLWIFI_DEBUGFS= 0
.if ${KERN_OPTS:MDEV_ACPI}
-WITH_CONFIG_ACPI= 1
+IWLWIFI_CONFIG_ACPI= 1
.endif
KMOD= if_iwlwifi
@@ -49,21 +49,21 @@ SRCS+= mld/regulatory.c mld/roc.c mld/rx.c mld/scan.c
SRCS+= mld/session-protect.c mld/sta.c mld/stats.c mld/thermal.c
SRCS+= mld/time_sync.c mld/tlc.c mld/tx.c
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(IWLWIFI_DEBUGFS) && ${IWLWIFI_DEBUGFS} > 0
SRCS+= fw/debugfs.c
SRCS+= mvm/debugfs.c mvm/debugfs-vif.c
SRCS+= mld/debugfs.c
CFLAGS+= -DCONFIG_IWLWIFI_DEBUGFS
CFLAGS+= -DCONFIG_MAC80211_DEBUGFS
.endif
-.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0
+.if defined(IWLWIFI_CONFIG_PM) && ${IWLWIFI_CONFIG_PM} > 0
SRCS+= mvm/d3.c
SRCS+= mld/d3.c
CFLAGS+= -DCONFIG_PM
CFLAGS+= -DCONFIG_PM_SLEEP
.endif
-.if defined(WITH_CONFIG_ACPI) && ${WITH_CONFIG_ACPI} > 0
+.if defined(IWLWIFI_CONFIG_ACPI) && ${IWLWIFI_CONFIG_ACPI} > 0
SRCS.DEV_ACPI+= fw/acpi.c
CFLAGS+= -DCONFIG_ACPI
.endif
@@ -74,9 +74,6 @@ CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
-CFLAGS+= -DKBUILD_MODNAME='"iwlwifi"'
-CFLAGS+= -DLINUXKPI_VERSION=61700
-
CFLAGS+= -I${DEVIWLWIFIDIR}
CFLAGS+= ${LINUXKPI_INCLUDES}
CFLAGS+= -DCONFIG_IWLDVM=0
@@ -96,6 +93,9 @@ CFLAGS+= -DCONFIG_IWLWIFI_DEVICE_TRACING=1
#CFLAGS+= -DCONFIG_THERMAL=1
#CFLAGS+= -DCONFIG_EFI=1
+CFLAGS+= -DKBUILD_MODNAME='"iwlwifi"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
CWARNFLAGS.clang.drv.c+= -Wno-initializer-overrides
CWARNFLAGS.drv.c+= -Wno-override-init ${CWARNFLAGS.${COMPILER_TYPE}.${.IMPSRC:T}}
diff --git a/sys/modules/le/Makefile b/sys/modules/le/Makefile
deleted file mode 100644
index 908247b957dc..000000000000
--- a/sys/modules/le/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-.PATH: ${SRCTOP}/sys/dev/le
-
-KMOD= if_le
-SRCS= am7990.c am79900.c ${if_le_isa} if_le_pci.c lance.c
-SRCS+= bus_if.h device_if.h ${isa_if} pci_if.h
-
-.if ${MACHINE_CPUARCH} == "i386"
-if_le_isa= if_le_isa.c
-isa_if= isa_if.h
-.endif
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile
index c465c76a7626..2090fe76d857 100644
--- a/sys/modules/linuxkpi/Makefile
+++ b/sys/modules/linuxkpi/Makefile
@@ -6,6 +6,7 @@ SRCS= linux_compat.c \
linux_devres.c \
linux_dmi.c \
linux_domain.c \
+ linux_eventfd.c \
linux_firmware.c \
linux_folio.c \
linux_fpu.c \
@@ -24,6 +25,7 @@ SRCS= linux_compat.c \
linux_radix.c \
linux_rcu.c \
linux_schedule.c \
+ linux_seq_buf.c \
linux_seq_file.c \
linux_shmemfs.c \
linux_shrinker.c \
diff --git a/sys/modules/mt76/Makefile b/sys/modules/mt76/Makefile
index 5abae4c5ad7c..726f7759e9be 100644
--- a/sys/modules/mt76/Makefile
+++ b/sys/modules/mt76/Makefile
@@ -1,8 +1,14 @@
+.include <kmod.opts.mk>
+
SUBDIR= core
SUBDIR+= mt7615
+.if ${KERN_OPTS:MDEV_PCI}
SUBDIR+= mt7915
+.endif
SUBDIR+= mt7921
SUBDIR+= mt7925
+.if ${KERN_OPTS:MDEV_PCI}
SUBDIR+= mt7996
+.endif
.include <bsd.subdir.mk>
diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc
index 44aa94c954a8..b44dcd2e2e82 100644
--- a/sys/modules/mt76/Makefile.inc
+++ b/sys/modules/mt76/Makefile.inc
@@ -1,12 +1,21 @@
# Common information shared by all submodule builds.
COMMONDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76
+DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/${MT76_DRIVER_NAME}
-.PATH: ${COMMONDIR}
+KMOD?= if_${MT76_DRIVER_NAME}
-WITH_CONFIG_PM= 0
-WITH_DEBUGFS= 0
-WITH_SOC_WED= 0
+# Bus attachment for the core part and that each driver can check
+# what the common code supports.
+MT76_PCI= 1
+MT76_SDIO= 0
+MT76_USB= 0
+
+# General options for common code so drivers can check.
+MT76_ACPI?= 0
+MT76_CONFIG_PM?= 0
+MT76_DEBUGFS?= 0
+MT76_SOC_WED?= 0
# Other
SRCS+= ${LINUXKPI_GENSRCS}
@@ -15,24 +24,26 @@ SRCS+= opt_wlan.h opt_inet6.h opt_inet.h
# This is true for all architectures we build for.
CFLAGS+= -DCONFIG_ARCH_DMA_ADDR_T_64BIT
-# Helpful after fresh imports.
-#CFLAGS+= -ferror-limit=0
-
-.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0
-CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM}
+.if defined(MT76_CONFIG_PM) && ${MT76_CONFIG_PM} > 0
+CFLAGS+= -DCONFIG_PM
.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
-CFLAGS+= -DCONFIG_MAC80211_DEBUGFS=${WITH_DEBUGFS}
+.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0
+CFLAGS+= -DCONFIG_MAC80211_DEBUGFS
.endif
-.if defined(WITH_SOC_WED) && ${WITH_SOC_WED} > 0
-CFLAGS+= CONFIG_NET_MEDIATEK_SOC_WED
+.if defined(MT76_SOC_WED) && ${MT76_SOC_WED} > 0
+CFLAGS+= -DCONFIG_NET_MEDIATEK_SOC_WED
.endif
CFLAGS+= -I${COMMONDIR}
+.if ${MT76_DRIVER_NAME} != "mt76_core"
+CFLAGS+= -I${DEVDIR}
+.endif
CFLAGS+= ${LINUXKPI_INCLUDES}
-CFLAGS+= -DLINUXKPI_VERSION=61700
+# Helpful after fresh imports.
+#CFLAGS+= -ferror-limit=0
+CFLAGS+= -DKBUILD_MODNAME='"${MT76_DRIVER_NAME}"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
-# end
diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile
index c782bf218d93..e4e65d8e3c24 100644
--- a/sys/modules/mt76/core/Makefile
+++ b/sys/modules/mt76/core/Makefile
@@ -1,16 +1,30 @@
-KMOD= mt76_core
+MT76_DRIVER_NAME= mt76_core
+
+.include <kmod.opts.mk>
+
+KMOD= ${MT76_DRIVER_NAME}
+
+.PATH: ${COMMONDIR}
# Basic stuff.
-SRCS= mac80211.c mmio.c util.c dma.c eeprom.c tx.c agg-rx.c mcu.c
+SRCS+= mac80211.c mmio.c util.c dma.c eeprom.c tx.c agg-rx.c mcu.c
SRCS+= channel.c scan.c wed.c
-#SRCS+= trace.c
-# Bus stuff.
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
SRCS+= pci.c
-.if defined(WITH_USB) && ${WITH_USB} > 0
-SRCS+= usb.c # usb_trace.c
.endif
-#SRCS+= sdio.c sdio_txrx.c
+
+# SDIO parts; SDIO depends on an MMCCAM kernel.
+.if defined(MT76_SDIO) && ${MT76_SDIO} > 0 && ${KERN_OPTS:MMMCCAM}
+SRCS+= sdio.c sdio_txrx.c
+.endif
+
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(MT76_USB) && ${MT76_USB} > 0
+SRCS+= usb.c
+#SRCS+= usb_trace.c
+.endif
# Connac-Lib stuff.
SRCS+= mt76_connac_mac.c mt76_connac_mcu.c mt76_connac3_mac.c
@@ -21,22 +35,21 @@ SRCS+= mt76_connac_mac.c mt76_connac_mcu.c mt76_connac3_mac.c
# MT792X-LIB stuff.
SRCS+= mt792x_core.c mt792x_mac.c mt792x_dma.c
#SRCS+= mt792x_trace.c
-.if defined(WITH_ACPI) && ${WITH_ACPI} > 0
+.if defined(MT76_ACPI) && ${MT76_ACPI} > 0
SRCS+= mt792x_acpi_sar.c
.endif
-.if defined(WITH_USB) && ${WITH_USB} > 0
+.if defined(MT76_USB) && ${MT76_USB} > 0
SRCS+= mt792x_usb.c
.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0
SRCS+= mt792x_debugfs.c
.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0
SRCS+= debugfs.c
.endif
-CFLAGS+= -DKBUILD_MODNAME='"mt76_core"'
-CFLAGS+= -DCONFIG_MAC80211_DEBUGFS=${WITH_DEBUGFS}
+#SRCS+= trace.c
EXPORT_SYMS= YES
diff --git a/sys/modules/mt76/mt7615/Makefile b/sys/modules/mt76/mt7615/Makefile
index 6d7cb945a32d..6eb650a8439a 100644
--- a/sys/modules/mt76/mt7615/Makefile
+++ b/sys/modules/mt76/mt7615/Makefile
@@ -1,26 +1,31 @@
-DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7615
+MT76_DRIVER_NAME= mt7615
+
+.include <kmod.opts.mk>
.PATH: ${DEVDIR}
-WITH_DEBUGFS= 0
-WITH_DEV_COREDUMP= 0
+MT7615_PCI= 1
-KMOD= if_mt7615
+MT7615_DEBUGFS= 0
+MT7615_DEV_COREDUMP= 0
# Common stuff.
-SRCS= init.c main.c mac.c mcu.c eeprom.c
+SRCS+= init.c main.c mac.c mcu.c eeprom.c
# PCIe (7622_WMAC ignored)
+.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \
+ defined(MT7615_PCI) && ${MT7615_PCI} > 0
SRCS+= dma.c mmio.c pci.c pci_init.c pci_mac.c
+.endif
# USB + SDIO ignored currently.
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT7615_DEBUGFS) && ${MT7615_DEBUGFS} > 0
SRCS+= debugfs.c
-CFLAGS+= -DCONFIG_MT7915_DEBUGFS=${WITH_DEBUGFS}
+CFLAGS+= -DCONFIG_MT7915_DEBUGFS
.endif
-CFLAGS+= -DKBUILD_MODNAME='"mt7615"'
-CFLAGS+= -I${DEVDIR}
+.if defined(MT7615_DEV_COREDUMP) && ${MT7615_DEV_COREDUMP} > 0
+.endif
.include <bsd.kmod.mk>
diff --git a/sys/modules/mt76/mt7915/Makefile b/sys/modules/mt76/mt7915/Makefile
index 049c919949f6..580fde3b7aa7 100644
--- a/sys/modules/mt76/mt7915/Makefile
+++ b/sys/modules/mt76/mt7915/Makefile
@@ -1,30 +1,37 @@
-DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7915
+MT76_DRIVER_NAME= mt7915
+
+.include <kmod.opts.mk>
.PATH: ${DEVDIR}
-WITH_DEBUGFS= 0
-WITH_DEV_COREDUMP= 1
+MT7915_PCI= 1
+
+MT7915_WMAC= 0
+MT7915_DEBUGFS= 0
+MT7915_DEV_COREDUMP= 1
-KMOD= if_mt7915
+SRCS+= init.c main.c mac.c mcu.c mmio.c eeprom.c
-# Common stuff.
-SRCS= init.c main.c mac.c mcu.c mmio.c eeprom.c
+# PCI only driver so it better be there (otherwise nothing will attach at least).
+.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \
+ defined(MT7915_PCI) && ${MT7915_PCI} > 0
SRCS+= pci.c dma.c
+.endif
# SOC+6E stuff.
-#SRCS+= soc.c
+.if defined(MT7915_WMAC) && ${MT7915_WMAC} > 0
+SRCS+= soc.c
+CFLAGS+= -DCONFIG_MT798X_WMAC
+.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT7915_DEBUGFS) && ${MT7915_DEBUGFS} > 0
SRCS+= debugfs.c
-CFLAGS+= -DCONFIG_MT7915_DEBUGFS=${WITH_DEBUGFS}
+CFLAGS+= -DCONFIG_MT7915_DEBUGFS
.endif
-.if defined(WITH_DEV_COREDUMP) && ${WITH_DEV_COREDUMP} > 0
+.if defined(MT7915_DEV_COREDUMP) && ${MT7915_DEV_COREDUMP} > 0
SRCS+= coredump.c
-CFLAGS+= -DCONFIG_DEV_COREDUMP=${WITH_DEV_COREDUMP}
+CFLAGS+= -DCONFIG_DEV_COREDUMP
.endif
-CFLAGS+= -DKBUILD_MODNAME='"mt7915"'
-CFLAGS+= -I${DEVDIR}
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile
index d3f201997a2d..b6dbe88204a3 100644
--- a/sys/modules/mt76/mt7921/Makefile
+++ b/sys/modules/mt76/mt7921/Makefile
@@ -1,27 +1,39 @@
-DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7921
+MT76_DRIVER_NAME= mt7921
+
+.include <kmod.opts.mk>
.PATH: ${DEVDIR}
-KMOD= if_mt7921
+MT7921_PCI= 1
+MT7921_SDIO= 0
+MT7921_USB= 0
+
+MT7921_DEBUGFS= 0
# Common stuff.
-SRCS= init.c main.c mac.c mcu.c
+SRCS+= init.c main.c mac.c mcu.c
-# PCI stuff.
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \
+ defined(MT7921_PCI) && ${MT7921_PCI} > 0
SRCS+= pci.c pci_mac.c pci_mcu.c
+.endif
-# USB stuff.
-#SRCS+= usb.c
+# SDIO parts; SDIO depends on an MMCCAM kernel.
+.if defined(MT76_SDIO) && ${MT76_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} && \
+ defined(MT7921_SDIO) && ${MT7921_SDIO} > 0
+SRCS+= sdio.c sdio_mac.c sdio_mcu.c
+.endif
-# SDIO stuff.
-#SRCS+= sdio.c sdio_mac.c sdio_mcu.c
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(MT76_USB) && ${MT76_USB} > 0 && \
+ defined(MT7921_USB) && ${MT7921_USB} > 0
+SRCS+= usb.c
+.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT7921_DEBUGFS) && ${MT7921_DEBUGFS} > 0
SRCS+= debugfs.c
-CFLAGS+= -DCONFIG_MT7921_DEBUGFS=${WITH_DEBUGFS}
+CFLAGS+= -DCONFIG_MT7921_DEBUGFS
.endif
-CFLAGS+= -DKBUILD_MODNAME='"mt7921"'
-CFLAGS+= -I${DEVDIR}
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/mt76/mt7925/Makefile b/sys/modules/mt76/mt7925/Makefile
index 58e23d06a9ad..c8477eadd7f5 100644
--- a/sys/modules/mt76/mt7925/Makefile
+++ b/sys/modules/mt76/mt7925/Makefile
@@ -1,24 +1,32 @@
-DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7925
+MT76_DRIVER_NAME= mt7925
+
+.include <kmod.opts.mk>
.PATH: ${DEVDIR}
-KMOD= if_mt7925
+MT7925_PCI= 1
+MT7925_USB= 1
+
+MT7925_DEBUGFS= 0
# Common stuff.
-SRCS= init.c main.c mac.c mcu.c
+SRCS+= init.c main.c mac.c mcu.c regd.c
-# PCI stuff.
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \
+ defined(MT7925_PCI) && ${MT7925_PCI} > 0
SRCS+= pci.c pci_mac.c pci_mcu.c
+.endif
-# USB stuff.
-#SRCS+= usb.c
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(MT76_USB) && ${MT76_USB} > 0 && \
+ defined(MT7925_USB) && ${MT7925_USB} > 0
+SRCS+= usb.c
+.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT7925_DEBUGFS) && ${MT7925_DEBUGFS} > 0
SRCS+= debugfs.c
-CFLAGS+= -DCONFIG_MT7925_DEBUGFS=${WITH_DEBUGFS}
+CFLAGS+= -DCONFIG_MT7925_DEBUGFS
.endif
-CFLAGS+= -DKBUILD_MODNAME='"mt7925"'
-CFLAGS+= -I${DEVDIR}
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/mt76/mt7996/Makefile b/sys/modules/mt76/mt7996/Makefile
index a43721b6079e..97de923c84ab 100644
--- a/sys/modules/mt76/mt7996/Makefile
+++ b/sys/modules/mt76/mt7996/Makefile
@@ -1,27 +1,36 @@
-DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7996
+MT76_DRIVER_NAME= mt7996
+
+.include <kmod.opts.mk>
.PATH: ${DEVDIR}
-WITH_DEBUGFS= 0
-WITH_DEV_COREDUMP= 1
+MT7996_PCI= 1
-KMOD= if_mt7996
+MT7996_DEBUGFS= 0
+MT7996_DEV_COREDUMP= 1
+MT7996_NPU= 0
# Common stuff.
-SRCS= init.c main.c mac.c mcu.c mmio.c eeprom.c
+SRCS+= init.c main.c mac.c mcu.c mmio.c eeprom.c
+# PCI only driver so it better be there (otherwise nothing will attach at least).
+.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \
+ defined(MT7996_PCI) && ${MT7996_PCI} > 0
SRCS+= pci.c dma.c
+.endif
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
+.if defined(MT7996_DEBUGFS) && ${MT7996_DEBUGFS} > 0
SRCS+= debugfs.c
-CFLAGS+= -DCONFIG_MT7996_DEBUGFS=${WITH_DEBUGFS}
+CFLAGS+= -DCONFIG_MT7996_DEBUGFS
.endif
-.if defined(WITH_DEV_COREDUMP) && ${WITH_DEV_COREDUMP} > 0
+.if defined(MT7996_DEV_COREDUMP) && ${MT7996_DEV_COREDUMP} > 0
SRCS+= coredump.c
-CFLAGS+= -DCONFIG_DEV_COREDUMP=${WITH_DEV_COREDUMP}
+CFLAGS+= -DCONFIG_DEV_COREDUMP
.endif
-CFLAGS+= -DKBUILD_MODNAME='"mt7996"'
-CFLAGS+= -I${DEVDIR}
+.if defined(MT7996_NPU) && ${MT7996_NPU} > 0
+SRCS+= npu.c
+CFLAGS+= -DCONFIG_MT7996_NPU
+.endif
.include <bsd.kmod.mk>
diff --git a/sys/modules/netgraph/netflow/Makefile b/sys/modules/netgraph/netflow/Makefile
index c73e9ac41680..c743db9d7eca 100644
--- a/sys/modules/netgraph/netflow/Makefile
+++ b/sys/modules/netgraph/netflow/Makefile
@@ -5,6 +5,6 @@
.PATH: ${SRCTOP}/sys/netgraph/netflow
KMOD= ng_netflow
-SRCS= ng_netflow.c netflow.c netflow_v9.c opt_inet.h opt_inet6.h opt_route.h
+SRCS= ng_netflow.c netflow.c netflow_v9.c opt_inet.h opt_inet6.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile
index 4abef5106899..6f8205289dd4 100644
--- a/sys/modules/netlink/Makefile
+++ b/sys/modules/netlink/Makefile
@@ -5,7 +5,7 @@ SRCS = netlink_module.c netlink_domain.c netlink_io.c \
netlink_message_writer.c netlink_generic.c \
netlink_route.c route/iface.c route/iface_drivers.c route/neigh.c \
route/nexthop.c route/rt.c
-SRCS+= opt_inet.h opt_inet6.h opt_route.h
+SRCS+= opt_inet.h opt_inet6.h
CFLAGS+= -DNETLINK_MODULE
diff --git a/sys/modules/qlnx/qlnxe/Makefile b/sys/modules/qlnx/qlnxe/Makefile
index 2a44ae6ddde5..3d8415cf0e57 100644
--- a/sys/modules/qlnx/qlnxe/Makefile
+++ b/sys/modules/qlnx/qlnxe/Makefile
@@ -58,7 +58,6 @@ SRCS+=qlnx_rdma.c
SRCS+=qlnx_ioctl.c
SRCS+=qlnx_os.c
-SRCS+=opt_inet.h
SRCS+= ${LINUXKPI_GENSRCS}
diff --git a/sys/modules/qlnx/qlnxev/Makefile b/sys/modules/qlnx/qlnxev/Makefile
index 766a5a950032..ed62f1f1dd40 100644
--- a/sys/modules/qlnx/qlnxev/Makefile
+++ b/sys/modules/qlnx/qlnxev/Makefile
@@ -49,7 +49,6 @@ SRCS+=ecore_vf.c
SRCS+=qlnx_ioctl.c
SRCS+=qlnx_os.c
-SRCS+=opt_inet.h
SRCS+= ${LINUXKPI_GENSRCS}
diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile
index ee47df54bcf9..04000dd66e95 100644
--- a/sys/modules/rtw88/Makefile
+++ b/sys/modules/rtw88/Makefile
@@ -1,10 +1,18 @@
+.include <kmod.opts.mk>
+
DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88
.PATH: ${DEVRTW88DIR}
-WITH_CONFIG_PM= 0
-WITH_DEBUGFS= 1
-WITH_LEDS= 0
+# Bus attachments.
+RTW88_PCI= 1
+RTW88_SDIO= 0
+RTW88_USB= 0
+
+# Options.
+RTW88_CONFIG_PM= 0
+RTW88_DEBUGFS= 1
+RTW88_LEDS= 0
KMOD= if_rtw88
@@ -14,48 +22,74 @@ SRCS+= bf.c coex.c debug.c efuse.c fw.c mac.c mac80211.c
SRCS+= phy.c ps.c regd.c
SRCS+= rx.c sar.c sec.c tx.c util.c
-.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0
+# Common
+SRCS+= rtw8723x.c # 87x3 common
+SRCS+= rtw8703b.c rtw8703b_tables.c # 11n
+SRCS+= rtw8723d.c rtw8723d_table.c # 11n
+SRCS+= rtw8814a.c rtw8814a_table.c # 11ac
+SRCS+= rtw8821c.c rtw8821c_table.c # 11ac
+SRCS+= rtw8822b.c rtw8822b_table.c # 11ac
+SRCS+= rtw8822c.c rtw8822c_table.c # 11ac
+
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(RTW88_PCI) && ${RTW88_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
+SRCS+= pci.c
+SRCS+= rtw8723de.c
+SRCS+= rtw8814ae.c
+SRCS+= rtw8821ce.c
+SRCS+= rtw8822be.c
+SRCS+= rtw8822ce.c
+.endif
+
+# SDIO parts; SDIO depends on an MMCCAM kernel.
+.if defined(RTW88_SDIO) && ${RTW88_SDIO} > 0 && ${KERN_OPTS:MMMCCAM}
+SRCS+= rtw8723cs.c
+SRCS+= rtw8723ds.c
+SRCS+= rtw8821cs.c
+SRCS+= rtw8822bs.c
+SRCS+= rtw8822cs.c
+.endif
+
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(RTW88_USB) && ${RTW88_USB} > 0
+SRCS+= usb.c
+SRCS+= rtw8723du.c
+SRCS+= rtw88xxa.c # 88xxa common
+SRCS+= rtw8812a.c rtw8812a_table.c rtw8812au.c
+SRCS+= rtw8814au.c
+SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c
+SRCS+= rtw8821cu.c
+SRCS+= rtw8822bu.c
+SRCS+= rtw8822cu.c
+CFLAGS+= -DCONFIG_RTW88_USB
+.endif
+
+.if defined(RTW88_CONFIG_PM) && ${RTW88_CONFIG_PM} > 0
SRCS+= wow.c
-CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM}
+CFLAGS+= -DCONFIG_PM=${RTW88_CONFIG_PM}
.endif
-# PCI parts.
-SRCS+= pci.c
-SRCS+= rtw8723x.c # 87x3 common
-SRCS+= rtw8703b.c rtw8703b_tables.c # 11n
-SRCS+= rtw8723d.c rtw8723d_table.c rtw8723de.c # 11n
-SRCS+= rtw8821c.c rtw8821c_table.c rtw8821ce.c # 11ac
-SRCS+= rtw8822b.c rtw8822b_table.c rtw8822be.c # 11ac
-SRCS+= rtw8822c.c rtw8822c_table.c rtw8822ce.c # 11ac
-SRCS+= rtw8814a.c rtw8814a_table.c rtw8814ae.c # 11ac
-
-# USB parts
-#SRCS+= rtw88xxa.c # 88xxa common
-#SRCS+= rtw8812a.c rtw8812a_table.c rtw8812au.c
-#SRCS+= rtw8814au.c
-#SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c
-#CFLAGS+= -DCONFIG_RTW88_USB
-
-.if defined(WITH_LEDS) && ${WITH_LEDS} > 0
+.if defined(RTW88_DEBUGFS) && ${RTW88_DEBUGFS} > 0
+CFLAGS+= -DCONFIG_RTW88_DEBUGFS
+.endif
+
+.if defined(RTW88_LEDS) && ${RTW88_LEDS} > 0
CFLAGS+= -DCONFIG_RTW88_LEDS
SRCS+= led.c
.endif
# Other
-SRCS+= ${LINUXKPI_GENSRCS}
-SRCS+= opt_wlan.h opt_inet6.h opt_inet.h
-
-CFLAGS+= -DKBUILD_MODNAME='"rtw88"'
-CFLAGS+= -DLINUXKPI_VERSION=61700
+SRCS+= opt_wlan.h opt_inet6.h opt_inet.h
+SRCS+= ${LINUXKPI_GENSRCS}
CFLAGS+= -I${DEVRTW88DIR}
CFLAGS+= ${LINUXKPI_INCLUDES}
-CFLAGS+= -DCONFIG_RTW88_DEBUG
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
-CFLAGS+= -DCONFIG_RTW88_DEBUGFS
-.endif
-
# Helpful after fresh imports.
#CFLAGS+= -ferror-limit=0
+CFLAGS+= -DCONFIG_RTW88_DEBUG
+
+CFLAGS+= -DKBUILD_MODNAME='"rtw88"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
+
.include <bsd.kmod.mk>
diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile
index 9aa6cfda1d3d..cb7c3ece7065 100644
--- a/sys/modules/rtw89/Makefile
+++ b/sys/modules/rtw89/Makefile
@@ -4,66 +4,85 @@ DEVRTW89DIR= ${SRCTOP}/sys/contrib/dev/rtw89
.PATH: ${DEVRTW89DIR}
-WITH_CONFIG_PM= 0
-WITH_DEBUGFS= 0
+# Bus attachments.
+RTW89_PCI= 1
+RTW89_SDIO= 0
+RTW89_USB= 0
+
+# Options.
+RTW89_CONFIG_PM= 0
+RTW89_DEBUGFS= 0
.if ${KERN_OPTS:MDEV_ACPI}
-WITH_CONFIG_ACPI= 1
+RTW89_CONFIG_ACPI= 1
.endif
KMOD= if_rtw89
+# Core parts.
SRCS= core.c
-SRCS+= pci.c pci_be.c
SRCS+= chan.c mac80211.c mac.c mac_be.c phy.c phy_be.c fw.c
SRCS+= cam.c efuse.c efuse_be.c regd.c sar.c coex.c ps.c ser.c
SRCS+= util.c
-SRCS+= rtw8852a.c rtw8852a_rfk.c rtw8852a_rfk_table.c rtw8852a_table.c
-SRCS+= rtw8852ae.c
-SRCS+= rtw8852c.c rtw8852c_rfk.c rtw8852c_rfk_table.c rtw8852c_table.c
-SRCS+= rtw8852ce.c
+
+# Common
SRCS+= rtw8851b.c rtw8851b_rfk.c rtw8851b_rfk_table.c rtw8851b_table.c
-SRCS+= rtw8851be.c
+SRCS+= rtw8852a.c rtw8852a_rfk.c rtw8852a_rfk_table.c rtw8852a_table.c
SRCS+= rtw8852b_common.c
SRCS+= rtw8852b.c rtw8852b_rfk.c rtw8852b_rfk_table.c rtw8852b_table.c
-SRCS+= rtw8852be.c
SRCS+= rtw8852bt.c rtw8852bt_rfk.c rtw8852bt_rfk_table.c
-SRCS+= rtw8852bte.c
+SRCS+= rtw8852c.c rtw8852c_rfk.c rtw8852c_rfk_table.c rtw8852c_table.c
SRCS+= rtw8922a.c rtw8922a_rfk.c
+
+# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
+.if defined(RTW89_PCI) && ${RTW89_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
+SRCS+= pci.c pci_be.c
+SRCS+= rtw8851be.c
+SRCS+= rtw8852ae.c
+SRCS+= rtw8852be.c
+SRCS+= rtw8852bte.c
+SRCS+= rtw8852ce.c
SRCS+= rtw8922ae.c
+.endif
-.if defined(WITH_CONFIG_ACPI) && ${WITH_CONFIG_ACPI} > 0
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(RTW89_USB) && ${RTW89_USB} > 0
+SRCS+= usb.c
+SRCS+= rtw8851bu.c
+SRCS+= rtw8852au.c
+SRCS+= rtw8852bu.c
+SRCS+= rtw8852cu.c
+.endif
+
+.if defined(RTW89_CONFIG_PM) && ${RTW89_CONFIG_PM} > 0
+CFLAGS+= -DCONFIG_PM=${RTW89_CONFIG_PM}
+SRCS+= wow.c
+.endif
+
+.if defined(RTW89_DEBUGFS) && ${RTW89_DEBUGFS} > 0
+CFLAGS+= -DCONFIG_RTW89_DEBUGFS
+.endif
+
+.if defined(RTW89_CONFIG_ACPI) && ${RTW89_CONFIG_ACPI} > 0
SRCS.DEV_ACPI+= acpi.c
CFLAGS+= -DCONFIG_ACPI
.endif
# This needs to always stay on for the LinuxKPI header file.
CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
-# USB parts
-#SRCS+= rtw8851bu.c rtw8852bu.c
-#SRCS+= usb.c
-
# CONFIG_RTW89_DEBUG (always on for now)
SRCS+= debug.c
-
-.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0
-CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM}
-SRCS+= wow.c
-.endif
+CFLAGS+= -DCONFIG_RTW89_DEBUGMSG
# Other
SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
-CFLAGS+= -DKBUILD_MODNAME='"rtw89"'
-CFLAGS+= -DLINUXKPI_VERSION=61700
-
CFLAGS+= -I${DEVRTW89DIR}
CFLAGS+= ${LINUXKPI_INCLUDES}
-CFLAGS+= -DCONFIG_RTW89_DEBUGMSG
-.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
-CFLAGS+= -DCONFIG_RTW89_DEBUGFS
-.endif
+# Helpful after fresh imports.
+#CFLAGS+= -ferror-limit=0 -fmacro-backtrace-limit=0
-#CFLAGS+= -ferror-limit=0
+CFLAGS+= -DKBUILD_MODNAME='"rtw89"'
+CFLAGS+= -DLINUXKPI_VERSION=61900
.include <bsd.kmod.mk>
diff --git a/sys/modules/ufshci/Makefile b/sys/modules/ufshci/Makefile
index ab5f3eaf88d0..aa0419d3a6d6 100644
--- a/sys/modules/ufshci/Makefile
+++ b/sys/modules/ufshci/Makefile
@@ -3,6 +3,7 @@
KMOD = ufshci
SRCS = ufshci.c \
+ ufshci_acpi.c \
ufshci_pci.c \
ufshci_ctrlr.c \
ufshci_dev.c \
@@ -12,8 +13,10 @@ SRCS = ufshci.c \
ufshci_req_sdb.c \
ufshci_sim.c \
ufshci_sysctl.c \
+ acpi_if.h \
bus_if.h \
device_if.h \
+ opt_acpi.h \
opt_cam.h \
pci_if.h
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index fed29336e5de..8fd023005b54 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -34,14 +34,15 @@ CFLAGS+= -I${ZINCDIR}/os/freebsd/zfs
CFLAGS+= -I${SRCDIR}/zstd/include
CFLAGS+= -I${.CURDIR}
-CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS \
+CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS -D__BSD_VISIBLE=1 \
-DHAVE_UIO_ZEROCOPY -DWITHOUT_NETDUMP -D__KERNEL -D_SYS_CONDVAR_H_ \
-D_SYS_VMEM_H_
.if ${MACHINE_ARCH} == "amd64"
-CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \
- -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \
- -DHAVE_VAES -DHAVE_VPCLMULQDQ
+CFLAGS+= -D__x86_64 -DHAVE_TOOLCHAIN_SSE2 -DHAVE_TOOLCHAIN_SSSE3 \
+ -DHAVE_TOOLCHAIN_SSE4_1 -DHAVE_TOOLCHAIN_AVX -DHAVE_TOOLCHAIN_AVX2 \
+ -DHAVE_TOOLCHAIN_AVX512F -DHAVE_TOOLCHAIN_AVX512VL \
+ -DHAVE_TOOLCHAIN_AVX512BW
.endif
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
@@ -53,18 +54,14 @@ CFLAGS+= -DBITS_PER_LONG=64
SRCS= vnode_if.h device_if.h bus_if.h
-# avl
+#avl
SRCS+= avl.c
-# icp
-SRCS+= edonr.c
-
#icp/algs/blake3
SRCS+= blake3.c \
blake3_generic.c \
blake3_impl.c
-
.if ${MACHINE_ARCH} == "aarch64"
#icp/asm-aarch64/blake3
SRCS+= b3_aarch64_sse2.S \
@@ -88,9 +85,12 @@ SRCS+= blake3_avx2.S \
SRCS+= aesni-gcm-avx2-vaes.S
.endif
+#icp/algs/edonr
+SRCS+= edonr.c
+
#icp/algs/sha2
-SRCS+= sha2_generic.c \
- sha256_impl.c \
+SRCS+= sha256_impl.c \
+ sha2_generic.c \
sha512_impl.c
.if ${MACHINE_ARCH} == "armv7"
@@ -108,8 +108,8 @@ OBJS+= zfs-sha256-armv8.o \
.if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le"
#icp/asm-ppc64/sha2
SRCS+= sha256-p8.S \
- sha512-p8.S \
sha256-ppc.S \
+ sha512-p8.S \
sha512-ppc.S
.endif
@@ -146,10 +146,10 @@ SRCS+= lapi.c \
lzio.c
#nvpair
-SRCS+= nvpair.c \
- fnvpair.c \
- nvpair_alloc_spl.c \
- nvpair_alloc_fixed.c
+SRCS+= fnvpair.c \
+ nvpair.c \
+ nvpair_alloc_fixed.c \
+ nvpair_alloc_spl.c
#os/freebsd/spl
SRCS+= acl_common.c \
@@ -196,6 +196,7 @@ SRCS+= abd_os.c \
zfs_crrd.c \
zfs_debug.c \
zfs_dir.c \
+ zfs_file_os.c \
zfs_ioctl_compat.c \
zfs_ioctl_os.c \
zfs_racct.c \
@@ -205,19 +206,17 @@ SRCS+= abd_os.c \
zio_crypt.c \
zvol_os.c
-#unicode
-SRCS+= u8_textprep.c
-
#zcommon
-SRCS+= zfeature_common.c \
+SRCS+= cityhash.c \
+ zfeature_common.c \
zfs_comutil.c \
zfs_deleg.c \
- zfs_fletcher.c \
zfs_fletcher_avx512.c \
+ zfs_fletcher.c \
zfs_fletcher_intel.c \
zfs_fletcher_sse.c \
- zfs_fletcher_superscalar.c \
zfs_fletcher_superscalar4.c \
+ zfs_fletcher_superscalar.c \
zfs_namecheck.c \
zfs_prop.c \
zfs_valstr.c \
@@ -232,14 +231,13 @@ SRCS+= abd.c \
blkptr.c \
bplist.c \
bpobj.c \
+ bptree.c \
+ bqueue.c \
brt.c \
btree.c \
- cityhash.c \
+ dataset_kstats.c \
dbuf.c \
dbuf_stats.c \
- bptree.c \
- bqueue.c \
- dataset_kstats.c \
ddt.c \
ddt_log.c \
ddt_stats.c \
@@ -257,13 +255,13 @@ SRCS+= abd.c \
dmu_zfetch.c \
dnode.c \
dnode_sync.c \
+ dsl_bookmark.c \
+ dsl_crypt.c \
dsl_dataset.c \
dsl_deadlist.c \
dsl_deleg.c \
- dsl_bookmark.c \
- dsl_dir.c \
- dsl_crypt.c \
dsl_destroy.c \
+ dsl_dir.c \
dsl_pool.c \
dsl_prop.c \
dsl_scan.c \
@@ -272,9 +270,9 @@ SRCS+= abd.c \
edonr_zfs.c \
fm.c \
gzip.c \
- lzjb.c \
lz4.c \
lz4_zfs.c \
+ lzjb.c \
metaslab.c \
mmp.c \
multilist.c \
@@ -287,6 +285,8 @@ SRCS+= abd.c \
sha2_zfs.c \
skein_zfs.c \
spa.c \
+ space_map.c \
+ space_reftree.c \
spa_checkpoint.c \
spa_config.c \
spa_errlog.c \
@@ -294,17 +294,16 @@ SRCS+= abd.c \
spa_log_spacemap.c \
spa_misc.c \
spa_stats.c \
- space_map.c \
- space_reftree.c \
txg.c \
+ u8_textprep.c \
uberblock.c \
unique.c \
vdev.c \
vdev_draid.c \
vdev_draid_rand.c \
vdev_file.c \
- vdev_indirect.c \
vdev_indirect_births.c \
+ vdev_indirect.c \
vdev_indirect_mapping.c \
vdev_initialize.c \
vdev_label.c \
@@ -312,11 +311,11 @@ SRCS+= abd.c \
vdev_missing.c \
vdev_queue.c \
vdev_raidz.c \
- vdev_raidz_math.c \
- vdev_raidz_math_scalar.c \
vdev_raidz_math_avx2.c \
vdev_raidz_math_avx512bw.c \
vdev_raidz_math_avx512f.c \
+ vdev_raidz_math.c \
+ vdev_raidz_math_scalar.c \
vdev_raidz_math_sse2.c \
vdev_raidz_math_ssse3.c \
vdev_rebuild.c \
@@ -335,7 +334,6 @@ SRCS+= abd.c \
zfeature.c \
zfs_byteswap.c \
zfs_chksum.c \
- zfs_file_os.c \
zfs_fm.c \
zfs_fuid.c \
zfs_impl.c \
@@ -360,33 +358,40 @@ SRCS+= abd.c \
zvol.c
#zstd
-SRCS+= zfs_zstd.c \
- entropy_common.c \
+SRCS+= zfs_zstd.c
+
+#zstd/common
+SRCS+= entropy_common.c \
error_private.c \
- fse_compress.c \
fse_decompress.c \
+ pool.c \
+ zstd_common.c
+
+#zstd/compress
+SRCS+= fse_compress.c \
hist.c \
huf_compress.c \
- huf_decompress.c \
- pool.c \
- xxhash.c \
- zstd_common.c \
zstd_compress.c \
zstd_compress_literals.c \
zstd_compress_sequences.c \
zstd_compress_superblock.c \
- zstd_ddict.c \
- zstd_decompress.c \
- zstd_decompress_block.c \
zstd_double_fast.c \
zstd_fast.c \
zstd_lazy.c \
zstd_ldm.c \
- zstd_opt.c
+ zstd_opt.c \
+ zstd_preSplit.c
+
+#zstd/decompress
+SRCS+= huf_decompress.c \
+ zstd_ddict.c \
+ zstd_decompress_block.c \
+ zstd_decompress.c
.include <bsd.kmod.mk>
CFLAGS+= -include ${SRCTOP}/sys/cddl/compat/opensolaris/sys/debug_compat.h
+CFLAGS+= -include ${ZINCDIR}/sys/simd_config.h
CFLAGS+= -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/static_ccompile.h
@@ -450,28 +455,29 @@ CFLAGS.zprop_common.c= -Wno-cast-qual
CFLAGS.zrlock.c= -Wno-cast-qual
#zstd
-CFLAGS.entropy_common.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.error_private.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.fse_compress.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL} ${NO_WUNUSED_BUT_SET_VARIABLE}
-CFLAGS.fse_decompress.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.huf_compress.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.huf_decompress.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.xxhash.c+= -U__BMI__ -fno-tree-vectorize
+CFLAGS.entropy_common.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.error_private.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.fse_compress.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL} ${NO_WUNUSED_BUT_SET_VARIABLE}
+CFLAGS.fse_decompress.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.huf_compress.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.huf_decompress.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.xxhash.c+= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize
CFLAGS.xxhash.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_common.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_compress.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_compress_literals.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_compress_sequences.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_compress_superblock.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL} ${NO_WUNUSED_BUT_SET_VARIABLE}
-CFLAGS.zstd_ddict.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_decompress.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_decompress_block.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_double_fast.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_fast.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_lazy.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_ldm.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
-CFLAGS.zstd_opt.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_common.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_compress.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_compress_literals.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_compress_sequences.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_compress_superblock.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL} ${NO_WUNUSED_BUT_SET_VARIABLE}
+CFLAGS.zstd_ddict.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_decompress.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_decompress_block.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_double_fast.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_fast.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_lazy.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_ldm.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_opt.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
+CFLAGS.zstd_preSplit.c= -U__BMI__ -DZSTD_NO_INTRINSICS -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
.if ${MACHINE_ARCH} == "aarch64"
CFLAGS.entropy_common.c+= ${__ZFS_ZSTD_AARCH64_FLAGS}
diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h
index 41d529acf50e..d61e2643fa5c 100644
--- a/sys/modules/zfs/zfs_config.h
+++ b/sys/modules/zfs/zfs_config.h
@@ -20,48 +20,11 @@
/* add_disk() returns int */
/* #undef HAVE_ADD_DISK_RET */
-/* Define if host toolchain supports AES */
-#define HAVE_AES 1
-
/* Define if you have [rt] */
#define HAVE_AIO_H 1
-#ifdef __amd64__
-#ifndef RESCUE
-/* Define if host toolchain supports AVX */
-#define HAVE_AVX 1
-#endif
-
-/* Define if host toolchain supports AVX2 */
-#define HAVE_AVX2 1
-
-/* Define if host toolchain supports AVX512BW */
-#define HAVE_AVX512BW 1
-
-/* Define if host toolchain supports AVX512CD */
-#define HAVE_AVX512CD 1
-
-/* Define if host toolchain supports AVX512DQ */
-#define HAVE_AVX512DQ 1
-
-/* Define if host toolchain supports AVX512ER */
-#define HAVE_AVX512ER 1
-
-/* Define if host toolchain supports AVX512F */
-#define HAVE_AVX512F 1
-
-/* Define if host toolchain supports AVX512IFMA */
-#define HAVE_AVX512IFMA 1
-
-/* Define if host toolchain supports AVX512PF */
-#define HAVE_AVX512PF 1
-
-/* Define if host toolchain supports AVX512VBMI */
-#define HAVE_AVX512VBMI 1
-
-/* Define if host toolchain supports AVX512VL */
-#define HAVE_AVX512VL 1
-#endif
+/* Define if your assembler supports .cfi_negate_ra_state. */
+/* #undef HAVE_AS_CFI_PSEUDO_OP */
/* backtrace() is available */
/* #undef HAVE_BACKTRACE */
@@ -195,6 +158,9 @@
/* backing_dev_info is available through queue gendisk */
/* #undef HAVE_BLK_QUEUE_DISK_BDI */
+/* blk_queue_rot() is available */
+/* #undef HAVE_BLK_QUEUE_ROT */
+
/* blk_queue_secure_erase() is available */
/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */
@@ -271,6 +237,9 @@
/* fault_in_iov_iter_readable() is available */
/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */
+/* linux/filelock.h exists */
+/* #undef HAVE_FILELOCK_HEADER */
+
/* file->f_version exists */
/* #undef HAVE_FILE_F_VERSION */
@@ -283,6 +252,9 @@
/* fsync_bdev() is declared in include/blkdev.h */
/* #undef HAVE_FSYNC_BDEV */
+/* fs_context exists */
+/* #undef HAVE_FS_CONTEXT */
+
/* yes */
/* #undef HAVE_GENERIC_FADVISE */
@@ -373,6 +345,9 @@
/* inode_set_mtime_to_ts() exists in linux/fs.h */
/* #undef HAVE_INODE_SET_MTIME_TO_TS */
+/* inode_state_read_once() exists */
+/* #undef HAVE_INODE_STATE_READ_ONCE */
+
/* timestamp_truncate() exists */
/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */
@@ -436,6 +411,24 @@
/* kasan_enabled() is GPL-only */
/* #undef HAVE_KASAN_ENABLED_GPL_ONLY */
+/* Define if kernel toolchain supports AES */
+/* #undef HAVE_KERNEL_AES */
+
+/* Define if kernel toolchain supports AVX */
+/* #undef HAVE_KERNEL_AVX */
+
+/* Define if kernel toolchain supports AVX2 */
+/* #undef HAVE_KERNEL_AVX2 */
+
+/* Define if kernel toolchain supports AVX512BW */
+/* #undef HAVE_KERNEL_AVX512BW */
+
+/* Define if kernel toolchain supports AVX512F */
+/* #undef HAVE_KERNEL_AVX512F */
+
+/* Define if kernel toolchain supports AVX512VL */
+/* #undef HAVE_KERNEL_AVX512VL */
+
/* kernel has kernel_fpu_* functions */
/* #undef HAVE_KERNEL_FPU */
@@ -454,6 +447,9 @@
/* kernel defines intptr_t */
/* #undef HAVE_KERNEL_INTPTR_T */
+/* Define if kernel toolchain supports MOVBE */
+/* #undef HAVE_KERNEL_MOVBE */
+
/* kernel has kernel_neon_* functions */
/* #undef HAVE_KERNEL_NEON */
@@ -463,9 +459,39 @@
/* kernel has linux/objtool.h */
/* #undef HAVE_KERNEL_OBJTOOL_HEADER */
+/* Define if kernel toolchain supports PCLMULQDQ */
+/* #undef HAVE_KERNEL_PCLMULQDQ */
+
+/* Define if kernel toolchain supports SHA512EXT */
+/* #undef HAVE_KERNEL_SHA512EXT */
+
+/* Define if kernel toolchain supports SSE2 */
+/* #undef HAVE_KERNEL_SSE2 */
+
+/* Define if kernel toolchain supports SSE4_1 */
+/* #undef HAVE_KERNEL_SSE4_1 */
+
+/* Define if kernel toolchain supports SSSE3 */
+/* #undef HAVE_KERNEL_SSSE3 */
+
/* strlcpy() exists */
/* #undef HAVE_KERNEL_STRLCPY */
+/* Define if kernel toolchain supports VAES */
+/* #undef HAVE_KERNEL_VAES */
+
+/* Define if kernel toolchain supports VPCLMULQDQ */
+/* #undef HAVE_KERNEL_VPCLMULQDQ */
+
+/* Define if kernel toolchain supports XSAVE */
+/* #undef HAVE_KERNEL_XSAVE */
+
+/* Define if kernel toolchain supports XSAVEOPT */
+/* #undef HAVE_KERNEL_XSAVEOPT */
+
+/* Define if kernel toolchain supports XSAVES */
+/* #undef HAVE_KERNEL_XSAVES */
+
/* kernel has kmap_local_page */
/* #undef HAVE_KMAP_LOCAL_PAGE */
@@ -508,6 +534,9 @@
/* Define to 1 if you have the 'mlockall' function. */
#define HAVE_MLOCKALL 1
+/* 'flags' in 'struct page' is a struct */
+/* #undef HAVE_MM_PAGE_FLAGS_STRUCT */
+
/* PG_error flag is available */
/* #undef HAVE_MM_PAGE_FLAG_ERROR */
@@ -517,8 +546,8 @@
/* page_size() is available */
/* #undef HAVE_MM_PAGE_SIZE */
-/* Define if host toolchain supports MOVBE */
-#define HAVE_MOVBE 1
+/* mount_setattr() and struct mount_attr are available */
+/* #undef HAVE_MOUNT_SETATTR */
/* Define if ns_type is accessible through ns_common */
/* #undef HAVE_NS_COMMON_TYPE */
@@ -535,12 +564,12 @@
/* iops->getattr() takes a path */
/* #undef HAVE_PATH_IOPS_GETATTR */
-/* Define if host toolchain supports PCLMULQDQ */
-#define HAVE_PCLMULQDQ 1
-
/* pin_user_pages_unlocked() is available */
/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */
+/* posix_acl_to_xattr() allocates its result */
+/* #undef HAVE_POSIX_ACL_TO_XATTR_ALLOC */
+
/* proc_handler ctl_table arg is const */
/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */
@@ -607,26 +636,6 @@
/* sops->free_inode() exists */
/* #undef HAVE_SOPS_FREE_INODE */
-#if defined(__amd64__) || defined(__i386__)
-/* Define if host toolchain supports SSE */
-#define HAVE_SSE 1
-
-/* Define if host toolchain supports SSE2 */
-#define HAVE_SSE2 1
-
-/* Define if host toolchain supports SSE3 */
-#define HAVE_SSE3 1
-
-/* Define if host toolchain supports SSE4.1 */
-#define HAVE_SSE4_1 1
-
-/* Define if host toolchain supports SSE4.2 */
-#define HAVE_SSE4_2 1
-
-/* Define if host toolchain supports SSSE3 */
-#define HAVE_SSSE3 1
-#endif
-
/* STACK_FRAME_NON_STANDARD is defined */
/* #undef HAVE_STACK_FRAME_NON_STANDARD */
@@ -699,6 +708,65 @@
/* i_op->tmpfile() has userns */
/* #undef HAVE_TMPFILE_USERNS */
+/* Define if host toolchain supports AES */
+#define HAVE_TOOLCHAIN_AES 1
+
+#ifdef __amd64__
+#ifndef RESCUE
+/* Define if host toolchain supports AVX */
+#define HAVE_TOOLCHAIN_AVX 1
+
+/* Define if host toolchain supports AVX2 */
+#define HAVE_TOOLCHAIN_AVX2 1
+#endif
+
+/* Define if host toolchain supports AVX512BW */
+#define HAVE_TOOLCHAIN_AVX512BW 1
+
+/* Define if host toolchain supports AVX512F */
+#define HAVE_TOOLCHAIN_AVX512F 1
+
+/* Define if host toolchain supports AVX512VL */
+#define HAVE_TOOLCHAIN_AVX512VL 1
+#endif
+
+/* Define if host toolchain supports MOVBE */
+#define HAVE_TOOLCHAIN_MOVBE 1
+
+/* Define if host toolchain supports PCLMULQDQ */
+#define HAVE_TOOLCHAIN_PCLMULQDQ 1
+
+/* Define if host toolchain supports SHA512EXT */
+#define HAVE_TOOLCHAIN_SHA512EXT 1
+
+#if defined(__amd64__) || defined(__i386__)
+/* Define if host toolchain supports SSE2 */
+#define HAVE_TOOLCHAIN_SSE2 1
+
+/* Define if host toolchain supports SSE4_1 */
+#define HAVE_TOOLCHAIN_SSE4_1 1
+
+/* Define if host toolchain supports SSSE3 */
+#define HAVE_TOOLCHAIN_SSSE3 1
+#endif
+
+#ifdef __amd64__
+/* Define if host toolchain supports VAES */
+#define HAVE_TOOLCHAIN_VAES 1
+
+/* Define if host toolchain supports VPCLMULQDQ */
+#define HAVE_TOOLCHAIN_VPCLMULQDQ 1
+#endif
+
+/* Define if host toolchain supports XSAVE */
+#define HAVE_TOOLCHAIN_XSAVE 1
+
+/* Define if host toolchain supports XSAVEOPT */
+#define HAVE_TOOLCHAIN_XSAVEOPT 1
+
+/* Define if host toolchain supports XSAVES */
+#define HAVE_TOOLCHAIN_XSAVES 1
+
/* totalhigh_pages() exists */
/* #undef HAVE_TOTALHIGH_PAGES */
@@ -720,11 +788,6 @@
/* iops->setattr() takes struct user_namespace* */
/* #undef HAVE_USERNS_IOPS_SETATTR */
-#ifdef __amd64__
-/* Define if host toolchain supports VAES */
-#define HAVE_VAES 1
-#endif
-
/* fops->clone_file_range() is available */
/* #undef HAVE_VFS_CLONE_FILE_RANGE */
@@ -764,11 +827,6 @@
/* __vmalloc page flags exists */
/* #undef HAVE_VMALLOC_PAGE_KERNEL */
-#ifdef __amd64__
-/* Define if host toolchain supports VPCLMULQDQ */
-#define HAVE_VPCLMULQDQ 1
-#endif
-
/* int (*writepage_t)() takes struct folio* */
/* #undef HAVE_WRITEPAGE_T_FOLIO */
@@ -787,15 +845,6 @@
/* xattr_handler->set() takes user_namespace */
/* #undef HAVE_XATTR_SET_USERNS */
-/* Define if host toolchain supports XSAVE */
-#define HAVE_XSAVE 1
-
-/* Define if host toolchain supports XSAVEOPT */
-#define HAVE_XSAVEOPT 1
-
-/* Define if host toolchain supports XSAVES */
-#define HAVE_XSAVES 1
-
/* ZERO_PAGE() is GPL-only */
/* #undef HAVE_ZERO_PAGE_GPL_ONLY */
@@ -862,7 +911,7 @@
/* #undef ZFS_DEVICE_MINOR */
/* Define the project alias string. */
-#define ZFS_META_ALIAS "zfs-2.4.99-292-FreeBSD_g962e68865"
+#define ZFS_META_ALIAS "zfs-2.4.99-468-FreeBSD_g3ee08abd2"
/* Define the project author. */
#define ZFS_META_AUTHOR "OpenZFS"
@@ -871,7 +920,7 @@
/* #undef ZFS_META_DATA */
/* Define the maximum compatible kernel version. */
-#define ZFS_META_KVER_MAX "6.18"
+#define ZFS_META_KVER_MAX "6.19"
/* Define the minimum compatible kernel version. */
#define ZFS_META_KVER_MIN "4.18"
@@ -892,7 +941,7 @@
#define ZFS_META_NAME "zfs"
/* Define the project release. */
-#define ZFS_META_RELEASE "292-FreeBSD_g962e68865"
+#define ZFS_META_RELEASE "468-FreeBSD_g3ee08abd2"
/* Define the project version. */
#define ZFS_META_VERSION "2.4.99"
diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h
index 4f16a8d1c917..156d9a25fdcb 100644
--- a/sys/modules/zfs/zfs_gitrev.h
+++ b/sys/modules/zfs/zfs_gitrev.h
@@ -1 +1 @@
-#define ZFS_META_GITREV "zfs-2.4.99-292-g962e68865"
+#define ZFS_META_GITREV "zfs-2.4.99-468-g3ee08abd2"