Module Name: src Committed By: martin Date: Wed Aug 5 15:06:55 UTC 2020
Modified Files: src/sys/arch/hppa/dev [netbsd-9]: cpu.c src/sys/arch/hppa/hppa [netbsd-9]: fpu.c Log Message: 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... To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.40.1 src/sys/arch/hppa/dev/cpu.c cvs rdiff -u -r1.26 -r1.26.4.1 src/sys/arch/hppa/hppa/fpu.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/hppa/dev/cpu.c diff -u src/sys/arch/hppa/dev/cpu.c:1.1 src/sys/arch/hppa/dev/cpu.c:1.1.40.1 --- src/sys/arch/hppa/dev/cpu.c:1.1 Mon Feb 24 07:23:42 2014 +++ src/sys/arch/hppa/dev/cpu.c Wed Aug 5 15:06:55 2020 @@ -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 @@ cpuattach(device_t parent, device_t self /* * 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"); Index: src/sys/arch/hppa/hppa/fpu.c diff -u src/sys/arch/hppa/hppa/fpu.c:1.26 src/sys/arch/hppa/hppa/fpu.c:1.26.4.1 --- src/sys/arch/hppa/hppa/fpu.c:1.26 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/fpu.c Wed Aug 5 15:06:55 2020 @@ -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 @@ hppa_fpu_flush(struct lwp *l) 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.