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 remove code to directly check for NULL ...



details:   https://anonhg.NetBSD.org/src/rev/f0da4ae24eb7
branches:  trunk
changeset: 451829:f0da4ae24eb7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Jun 07 00:18:26 2019 +0000

description:
remove code to directly check for NULL savefpstate() calls.
it has not triggered for years now, and if it comes back,
you still get a normal kernel fault.

diffstat:

 sys/arch/sparc/sparc/locore.s |  20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

diffs (41 lines):

diff -r 64e892770905 -r f0da4ae24eb7 sys/arch/sparc/sparc/locore.s
--- a/sys/arch/sparc/sparc/locore.s     Thu Jun 06 23:19:45 2019 +0000
+++ b/sys/arch/sparc/sparc/locore.s     Fri Jun 07 00:18:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.273 2019/04/06 03:06:27 thorpej Exp $     */
+/*     $NetBSD: locore.s,v 1.274 2019/06/07 00:18:26 mrg Exp $ */
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -5649,8 +5649,6 @@
 
 ENTRY(savefpstate)
        cmp     %o0, 0
-       bz      Lfp_null_fpstate
-        nop
        rd      %psr, %o1               ! enable FP before we begin
        set     PSR_EF, %o2
        or      %o1, %o2, %o1
@@ -5692,22 +5690,6 @@
        retl
         std    %f30, [%o0 + FS_REGS + (4*30)]
 
-/* Handle NULL fpstate argument for savefpstate */
-Lfp_null_fpstate:
-#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]
-#endif
-
 /*
  * Store the (now known nonempty) FP queue.
  * We have to reread the fsr each time in order to get the new QNE bit.



Home | Main Index | Thread Index | Old Index