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

This commit is contained in:
skrll 2020-04-16 05:44:43 +00:00
parent d4355f9c83
commit 07e87d542d
2 changed files with 13 additions and 9 deletions

View File

@ -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, void *aux)
/*
* 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");

View File

@ -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.