git: 96465c789a5f - main - arm: Compile vfp.c conditionally rather than using an ifdef

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 11 Dec 2023 14:16:34 UTC
The branch main has been updated by markj:

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

commit 96465c789a5ff2619c5d49305517b35db9754ffb
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-11 14:07:40 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-11 14:07:40 +0000

    arm: Compile vfp.c conditionally rather than using an ifdef
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/arm/arm/vfp.c  | 4 ----
 sys/conf/files.arm | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c
index 40a3491c1cf9..a4be235e1e01 100644
--- a/sys/arm/arm/vfp.c
+++ b/sys/arm/arm/vfp.c
@@ -28,8 +28,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
-#ifdef VFP
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/limits.h>
@@ -524,5 +522,3 @@ is_fpu_kern_thread(u_int flags __unused)
 	curpcb = curthread->td_pcb;
 	return ((curpcb->pcb_fpflags & PCB_FP_KERN) != 0);
 }
-
-#endif
diff --git a/sys/conf/files.arm b/sys/conf/files.arm
index 8b5674b839df..075b05e36d78 100644
--- a/sys/conf/files.arm
+++ b/sys/conf/files.arm
@@ -75,7 +75,7 @@ arm/arm/uio_machdep.c		standard
 arm/arm/undefined.c		standard
 arm/arm/unwind.c		optional	ddb | kdtrace_hooks | stack
 arm/arm/vm_machdep.c		standard
-arm/arm/vfp.c			standard
+arm/arm/vfp.c			optional	vfp
 cddl/dev/dtrace/arm/dtrace_asm.S			optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/arm/dtrace_subr.c			optional dtrace compile-with "${DTRACE_C}"
 cddl/dev/fbt/arm/fbt_isa.c				optional dtrace_fbt | dtraceall compile-with "${FBT_C}"