git: 894492f5bf4e - stable/13 - linuxkpi: #ifdef guard fpu_kern(9) usage

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Wed, 14 Jun 2023 16:55:41 UTC
The branch stable/13 has been updated by mhorne:

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

commit 894492f5bf4e74f49a927f4c584779aeed983cc7
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2023-06-12 13:51:16 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-06-14 16:54:52 +0000

    linuxkpi: #ifdef guard fpu_kern(9) usage
    
    The recent revert of 8ca78eb03fd4 removed the guards around these calls.
    As a result, LINT builds for architectures which do not implement this
    API on the branch are failing -- armv7, powerpc, powerpc64, riscv.
    
    This is a direct commit to stable/13.
    
    Fixes:  fa6603d4a725 (Revert "LinuxKPI: Make FPU sections thread-safe...")
    Differential Revision:  https://reviews.freebsd.org/D40497
---
 sys/compat/linuxkpi/common/src/linux_fpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/linuxkpi/common/src/linux_fpu.c b/sys/compat/linuxkpi/common/src/linux_fpu.c
index 976e55e68ca1..2f05ef94d5ac 100644
--- a/sys/compat/linuxkpi/common/src/linux_fpu.c
+++ b/sys/compat/linuxkpi/common/src/linux_fpu.c
@@ -30,6 +30,7 @@
 #include <sys/proc.h>
 #include <sys/kernel.h>
 
+#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
 #include <machine/fpu.h>
 
 struct fpu_kern_ctx *__lkpi_fpu_ctx;
@@ -48,3 +49,4 @@ linux_fpu_uninit(void *arg __unused)
 	fpu_kern_free_ctx(__lkpi_fpu_ctx);
 }
 SYSUNINIT(linux_fpu, SI_SUB_EVENTHANDLER, SI_ORDER_SECOND, linux_fpu_uninit, NULL);
+#endif