Module Name:    src
Committed By:   skrll
Date:           Sat May  1 06:53:09 UTC 2021

Modified Files:
        src/sys/arch/riscv/include: locore.h
        src/sys/arch/riscv/riscv: riscv_machdep.c

Log Message:
Sprinkle #ifdef FPE for now


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/riscv/include/locore.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/riscv/riscv/riscv_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/riscv/include/locore.h
diff -u src/sys/arch/riscv/include/locore.h:1.7 src/sys/arch/riscv/include/locore.h:1.8
--- src/sys/arch/riscv/include/locore.h:1.7	Wed Nov  4 07:09:45 2020
+++ src/sys/arch/riscv/include/locore.h	Sat May  1 06:53:08 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.7 2020/11/04 07:09:45 skrll Exp $ */
+/* $NetBSD: locore.h,v 1.8 2021/05/01 06:53:08 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -118,7 +118,10 @@ struct mainbus_attach_args {
 
 #ifdef _KERNEL
 extern int cpu_printfataltraps;
+
+#ifdef FPE
 extern const pcu_ops_t pcu_fpu_ops;
+#endif
 
 static inline vaddr_t
 stack_align(vaddr_t sp)
@@ -135,31 +138,43 @@ userret(struct lwp *l)
 static inline void
 fpu_load(void)
 {
+#ifdef FPE
 	pcu_load(&pcu_fpu_ops);
+#endif
 }
 
 static inline void
 fpu_save(lwp_t *l)
 {
+#ifdef FPE
 	pcu_save(&pcu_fpu_ops, l);
+#endif
 }
 
 static inline void
 fpu_discard(lwp_t *l)
 {
+#ifdef FPE
 	pcu_discard(&pcu_fpu_ops, l, false);
+#endif
 }
 
 static inline void
 fpu_replace(lwp_t *l)
 {
+#ifdef FPE
 	pcu_discard(&pcu_fpu_ops, l, true);
+#endif
 }
 
 static inline bool
 fpu_valid_p(lwp_t *l)
 {
+#ifdef FPE
 	return pcu_valid_p(&pcu_fpu_ops, l);
+#else
+	return false;
+#endif
 }
 
 void	__syncicache(const void *, size_t);

Index: src/sys/arch/riscv/riscv/riscv_machdep.c
diff -u src/sys/arch/riscv/riscv/riscv_machdep.c:1.13 src/sys/arch/riscv/riscv/riscv_machdep.c:1.14
--- src/sys/arch/riscv/riscv/riscv_machdep.c:1.13	Wed Nov  4 20:05:47 2020
+++ src/sys/arch/riscv/riscv/riscv_machdep.c	Sat May  1 06:53:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: riscv_machdep.c,v 1.13 2020/11/04 20:05:47 skrll Exp $	*/
+/*	$NetBSD: riscv_machdep.c,v 1.14 2021/05/01 06:53:08 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2014, 2019 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 
 #include "opt_modular.h"
 
-__RCSID("$NetBSD: riscv_machdep.c,v 1.13 2020/11/04 20:05:47 skrll Exp $");
+__RCSID("$NetBSD: riscv_machdep.c,v 1.14 2021/05/01 06:53:08 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -65,7 +65,9 @@ struct cpu_info cpu_info_store = {
 };
 
 const pcu_ops_t * const pcu_ops_md_defs[PCU_UNIT_COUNT] = {
+#ifdef FPE
 	[PCU_FPU] = &pcu_fpu_ops,
+#endif
 };
 
 void

Reply via email to