Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/riscv Sprinkle #ifdef FPE for now



details:   https://anonhg.NetBSD.org/src/rev/21b093b297d1
branches:  trunk
changeset: 983051:21b093b297d1
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat May 01 06:53:08 2021 +0000

description:
Sprinkle #ifdef FPE for now

diffstat:

 sys/arch/riscv/include/locore.h      |  17 ++++++++++++++++-
 sys/arch/riscv/riscv/riscv_machdep.c |   6 ++++--
 2 files changed, 20 insertions(+), 3 deletions(-)

diffs (92 lines):

diff -r 771e6faa2f34 -r 21b093b297d1 sys/arch/riscv/include/locore.h
--- a/sys/arch/riscv/include/locore.h   Sat May 01 06:48:51 2021 +0000
+++ b/sys/arch/riscv/include/locore.h   Sat May 01 06:53:08 2021 +0000
@@ -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 @@
 
 #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 @@
 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);
diff -r 771e6faa2f34 -r 21b093b297d1 sys/arch/riscv/riscv/riscv_machdep.c
--- a/sys/arch/riscv/riscv/riscv_machdep.c      Sat May 01 06:48:51 2021 +0000
+++ b/sys/arch/riscv/riscv/riscv_machdep.c      Sat May 01 06:53:08 2021 +0000
@@ -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 @@
 };
 
 const pcu_ops_t * const pcu_ops_md_defs[PCU_UNIT_COUNT] = {
+#ifdef FPE
        [PCU_FPU] = &pcu_fpu_ops,
+#endif
 };
 
 void



Home | Main Index | Thread Index | Old Index