Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/arch/mips/mips Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/4843500f8ed2
branches:  netbsd-8
changeset: 852191:4843500f8ed2
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 25 11:22:43 2018 +0000

description:
Pull up following revision(s) (requested by sevan in ticket #1143):

        sys/arch/mips/mips/fp.S: revision 1.49

Load curlwp into a0 to call fpu_save(curlwp), not fpu_save(garbage).

The lwp argument to fpu_save was added by chuq in revision 1.14 of
mips_fpu.c, but this call was not updated to pass it.  This is the
correct lwp to pass because we are in the middle of executing a
kernel-emulated fp instruction, so curlwp must own the fpu state, and
we are trying to write the fp registers to memory so we can adjust
them there when ctc1 would fail.

Fixes PR port-cobalt/53090, PR port-sgimips/53791.

diffstat:

 sys/arch/mips/mips/fp.S |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 613f6d955588 -r 4843500f8ed2 sys/arch/mips/mips/fp.S
--- a/sys/arch/mips/mips/fp.S   Tue Dec 25 11:19:52 2018 +0000
+++ b/sys/arch/mips/mips/fp.S   Tue Dec 25 11:22:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fp.S,v 1.48 2017/02/27 06:57:45 chs Exp $      */
+/*     $NetBSD: fp.S,v 1.48.6.1 2018/12/25 11:22:43 martin Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -2827,6 +2827,7 @@
         * ctc1 with fpe bits set causes FPE in kernel mode panic on 5231.
         */
        REG_S   a2, CALLFRAME_SIZ + 3*SZREG(sp)
+       move    a0, MIPS_CURLWP                 # get current lwp
        jal     _C_LABEL(fpu_save)              # on RM5231
 
        REG_L   a2, CALLFRAME_SIZ + 3*SZREG(sp)



Home | Main Index | Thread Index | Old Index