Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/hppa Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/21885b75d853
branches:  netbsd-9
changeset: 936828:21885b75d853
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Aug 05 15:06:55 2020 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #1039):

        sys/arch/hppa/dev/cpu.c: revision 1.2
        sys/arch/hppa/hppa/fpu.c: revision 1.27

Don't KASSERT there's an FPU present.  QEMU doesn't have one...

diffstat:

 sys/arch/hppa/dev/cpu.c  |  15 +++++++++------
 sys/arch/hppa/hppa/fpu.c |   7 ++++---
 2 files changed, 13 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r d9c25753eb7a -r 21885b75d853 sys/arch/hppa/dev/cpu.c
--- a/sys/arch/hppa/dev/cpu.c   Wed Aug 05 14:59:41 2020 +0000
+++ b/sys/arch/hppa/dev/cpu.c   Wed Aug 05 15:06:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.1 2014/02/24 07:23:42 skrll Exp $    */
+/*     $NetBSD: cpu.c,v 1.1.40.1 2020/08/05 15:06:55 martin Exp $      */
 
 /*     $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $   */
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1 2014/02/24 07:23:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1.40.1 2020/08/05 15:06:55 martin Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -150,10 +150,13 @@
        /*
         * Describe the floating-point support.
         */
-       KASSERT(fpu_present);
-       aprint_normal("%s: %s floating point, rev %d\n", device_xname(self),
-           hppa_mod_info(HPPA_TYPE_FPU, (fpu_version >> 16) & 0x1f),
-           (fpu_version >> 11) & 0x1f);
+       if (fpu_present)
+               aprint_normal("%s: %s floating point, rev %d\n", device_xname(self),
+                   hppa_mod_info(HPPA_TYPE_FPU, (fpu_version >> 16) & 0x1f),
+                   (fpu_version >> 11) & 0x1f);
+       else
+               aprint_normal("%s: no floating point\n", device_xname(self));
+
 
        if (cpuno >= HPPA_MAXCPUS) {
                aprint_normal_dev(self, "not started\n");
diff -r d9c25753eb7a -r 21885b75d853 sys/arch/hppa/hppa/fpu.c
--- a/sys/arch/hppa/hppa/fpu.c  Wed Aug 05 14:59:41 2020 +0000
+++ b/sys/arch/hppa/hppa/fpu.c  Wed Aug 05 15:06:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.26 2019/04/15 20:45:08 skrll Exp $   */
+/*     $NetBSD: fpu.c,v 1.26.4.1 2020/08/05 15:06:55 martin Exp $      */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.26 2019/04/15 20:45:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.26.4.1 2020/08/05 15:06:55 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -198,7 +198,8 @@
        struct pcb *pcb = lwp_getpcb(l);
        struct cpu_info *ci = curcpu();
 
-       KASSERT(fpu_present);
+       if (!fpu_present)
+               return;
 
        /*
         * If this process' state is currently in hardware, swap it out.



Home | Main Index | Thread Index | Old Index