git: fe0f6950391c - main - Enable OFED on all platforms except for 32-bit arm.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 08 Mar 2023 23:12:41 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=fe0f6950391cf10bbfcd1672d8e111a41063a4c8

commit fe0f6950391cf10bbfcd1672d8e111a41063a4c8
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-03-08 23:07:11 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-03-08 23:12:00 +0000

    Enable OFED on all platforms except for 32-bit arm.
    
    32-bit arm triggers multiple -Wunaligned-access errors due to
    structure packing.
    
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D38972
---
 share/man/man5/src.conf.5 |  2 +-
 share/mk/src.opts.mk      |  3 +--
 sys/conf/kern.opts.mk     |  5 +----
 sys/modules/Makefile      | 19 ++++++++-----------
 4 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index 8930c9a6238c..d298f38ff0b5 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1259,7 +1259,7 @@ Disable the build of the
 Infiniband software stack, including kernel modules and userspace libraries.
 .Pp
 This is a default setting on
-arm/armv6, arm/armv7, arm64/aarch64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf.
+arm/armv6 and arm/armv7.
 When set, it enforces these options:
 .Pp
 .Bl -item -compact
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 057a0f7a9be9..d8cadd43a88b 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -352,8 +352,7 @@ __DEFAULT_YES_OPTIONS+=OPENMP
 __DEFAULT_NO_OPTIONS+=OPENMP
 .endif
 
-.if ${__T} != "i386" && ${__T} != "amd64" && \
-    ${__T:Mpowerpc64*} == ""
+.if ${__T:Marm*} != ""
 BROKEN_OPTIONS+= OFED
 .endif
 
diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk
index 93edc1b6e63f..c7587b7728d7 100644
--- a/sys/conf/kern.opts.mk
+++ b/sys/conf/kern.opts.mk
@@ -82,10 +82,7 @@ BROKEN_OPTIONS+= INIT_ALL_ZERO
 BROKEN_OPTIONS+= ZFS
 .endif
 
-# Things that don't work because the kernel doesn't have the support
-# for them.
-.if ${MACHINE} != "i386" && ${MACHINE} != "amd64" && \
-    ${MACHINE_ARCH:Mpowerpc64*} == ""
+.if ${MACHINE_CPUARCH} == "arm"
 BROKEN_OPTIONS+= OFED
 .endif
 
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 4aa4a26e6d17..0bce649ac978 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -522,14 +522,19 @@ SUBDIR+=	linux64
 SUBDIR+=	linux_common
 .endif
 
-.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
-    ${MACHINE_CPUARCH} == "i386"
-_ena=		ena
+.if ${MACHINE_CPUARCH} != "arm"
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
 _ibcore=	ibcore
 _ipoib=		ipoib
 _iser=		iser
+_mthca=		mthca
+_rdma=		rdma
 .endif
+.endif
+
+.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
+    ${MACHINE_CPUARCH} == "i386"
+_ena=		ena
 _ipmi=		ipmi
 _iwlwifi=	iwlwifi
 .if ${MK_SOURCELESS_UCODE} != "no"
@@ -543,7 +548,6 @@ _mlx4en=	mlx4en
 _mlx5en=	mlx5en
 .endif
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
-_mthca=		mthca
 _mlx4ib=	mlx4ib
 _mlx5ib=	mlx5ib
 .endif
@@ -703,9 +707,6 @@ _qat=		qat
 _qatfw=		qatfw
 _qat_c2xxx=	qat_c2xxx
 _qat_c2xxxfw=	qat_c2xxxfw
-.if ${MK_OFED} != "no" || defined(ALL_MODULES)
-_rdma=		rdma
-.endif
 _safe=		safe
 _speaker=	speaker
 _splash=	splash
@@ -848,11 +849,7 @@ _ixl=		ixl
 _mlx5=		mlx5
 _nvram=		opal_nvram
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
-_ibcore=	ibcore
-_ipoib=		ipoib
-_iser=		iser
 _mlx5ib=	mlx5ib
-_rdma=		rdma
 .endif
 .if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
        defined(ALL_MODULES)