From 48290fcae6e4dccb075262c50c0c0ac5ea970031 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 23 May 2007 08:16:43 +0000 Subject: [PATCH] Fix a stupid bug in the save_fpstate ipi, which caused overwriting of struct lwp of the lwp owning the fpu. Fix clearing the fplwp - %o0 will not survive the call to savefpstate - duh! --- sys/arch/sparc64/sparc64/locore.s | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index a937508f7790..6b6507e275e4 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.248 2007/05/20 21:51:01 martin Exp $ */ +/* $NetBSD: locore.s,v 1.249 2007/05/23 08:16:43 martin Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -9465,8 +9465,9 @@ ENTRY(sparc64_ipi_save_fpstate) sethi %hi(CPUINFO_VA + CI_FPLWP), %o0 ldx [%o0 + %lo(CPUINFO_VA + CI_FPLWP)], %o0 call savefpstate - ldx [%o0 + L_FPSTATE], %l1 - stx %g0, [%o0] ! fplwp = NULL + ldx [%o0 + L_FPSTATE], %o0 + sethi %hi(CPUINFO_VA + CI_FPLWP), %o0 + stx %g0, [%o0 + %lo(CPUINFO_VA + CI_FPLWP)] ! fplwp = NULL mov %g6, %o5 ! restore saved registers mov %g5, %o4 mov %g4, %o3