Module Name: src
Committed By: skrll
Date: Thu Apr 16 05:44:44 UTC 2020
Modified Files:
src/sys/arch/hppa/dev: cpu.c
src/sys/arch/hppa/hppa: fpu.c
Log Message:
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.2 src/sys/arch/hppa/dev/cpu.c
cvs rdiff -u -r1.26 -r1.27 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.2
--- src/sys/arch/hppa/dev/cpu.c:1.1 Mon Feb 24 07:23:42 2014
+++ src/sys/arch/hppa/dev/cpu.c Thu Apr 16 05:44:44 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.1 2014/02/24 07:23:42 skrll Exp $ */
+/* $NetBSD: cpu.c,v 1.2 2020/04/16 05:44:44 skrll 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.2 2020/04/16 05:44:44 skrll 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.27
--- src/sys/arch/hppa/hppa/fpu.c:1.26 Mon Apr 15 20:45:08 2019
+++ src/sys/arch/hppa/hppa/fpu.c Thu Apr 16 05:44:43 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.26 2019/04/15 20:45:08 skrll Exp $ */
+/* $NetBSD: fpu.c,v 1.27 2020/04/16 05:44:43 skrll 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.27 2020/04/16 05:44:43 skrll 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.