git: 0f6829488ef3 - main - linux32: add a hack to avoid redefining the type of the savefpu tag
Konstantin Belousov
kib at FreeBSD.org
Tue Sep 21 17:21:16 UTC 2021
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=0f6829488ef32142b9ea1c0806fb5ecfe0872c02
commit 0f6829488ef32142b9ea1c0806fb5ecfe0872c02
Author: Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-09-13 21:40:02 +0000
Commit: Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-09-21 17:20:15 +0000
linux32: add a hack to avoid redefining the type of the savefpu tag
when compiling in amd64 kernel environment with -m32. This is a temporal
workaround for some future proper (but unclear) fix.
Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31954
---
sys/modules/linux/Makefile | 2 +-
sys/x86/include/fpu.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index 373ec3dcae91..6c95a548bffb 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -60,7 +60,7 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o
sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET}
.if ${MACHINE_CPUARCH} == "amd64"
-VDSOFLAGS=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -m32
+VDSOFLAGS=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -D__M32_BROKEN_MODULE_HACK__ -m32
.else
VDSOFLAGS=-mregparm=0
.endif
diff --git a/sys/x86/include/fpu.h b/sys/x86/include/fpu.h
index 313a03ea55c9..bb8533d599dd 100644
--- a/sys/x86/include/fpu.h
+++ b/sys/x86/include/fpu.h
@@ -123,10 +123,12 @@ struct savexmm {
} __aligned(16);
#ifdef __i386__
+#ifndef __M32_BROKEN_MODULE_HACK__
union savefpu {
struct save87 sv_87;
struct savexmm sv_xmm;
};
+#endif /* __M32_BROKEN_MODULE_HACK__ */
#else
/* Floating point context. (amd64 fxsave/fxrstor) */
struct savefpu {
More information about the dev-commits-src-all
mailing list