Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/sparc convert Lfp_null_fpstate (which is invo...
details: https://anonhg.NetBSD.org/src/rev/a83da4896f9c
branches: trunk
changeset: 323113:a83da4896f9c
user: mrg <mrg%NetBSD.org@localhost>
date: Thu May 31 22:44:13 2018 +0000
description:
convert Lfp_null_fpstate (which is invoked if savefpstate() is called
with NULL) into a panic for DIAGNOSTIC kernels.
diffstat:
sys/arch/sparc/sparc/locore.s | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diffs (41 lines):
diff -r 147ec58034d6 -r a83da4896f9c sys/arch/sparc/sparc/locore.s
--- a/sys/arch/sparc/sparc/locore.s Thu May 31 22:26:36 2018 +0000
+++ b/sys/arch/sparc/sparc/locore.s Thu May 31 22:44:13 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.270 2018/03/16 09:29:24 mrg Exp $ */
+/* $NetBSD: locore.s,v 1.271 2018/05/31 22:44:13 mrg Exp $ */
/*
* Copyright (c) 1996 Paul Kranenburg
@@ -5754,24 +5754,20 @@
retl
std %f30, [%o0 + FS_REGS + (4*30)]
-/*
- * We really should panic here but while we figure out what the bug is
- * that a remote CPU gets a NULL struct fpstate *, this lets the system
- * work at least seemingly stably.
- */
+/* Handle NULL fpstate argument for savefpstate */
Lfp_null_fpstate:
-#if 1
+#ifdef DIAGNOSTIC
+ ld [%o5 + CPUINFO_CPUNO], %o1
+ sethi %hi(Lpanic_savefpstate), %o0
+ call _C_LABEL(panic)
+ or %o0, %lo(Lpanic_savefpstate), %o0
+#else
sethi %hi(CPUINFO_VA), %o5
ldd [%o5 + CPUINFO_SAVEFPSTATE_NULL], %o2
inccc %o3
addx %o2, 0, %o2
retl
std %o2, [%o5 + CPUINFO_SAVEFPSTATE_NULL]
-#else
- ld [%o5 + CPUINFO_CPUNO], %o1
- sethi %hi(Lpanic_savefpstate), %o0
- call _C_LABEL(panic)
- or %o0, %lo(Lpanic_savefpstate), %o0
#endif
/*
Home |
Main Index |
Thread Index |
Old Index