Module Name: src
Committed By: chs
Date: Fri Mar 17 23:43:43 UTC 2017
Modified Files:
src/sys/arch/powerpc/booke: spe.c
Log Message:
apply changes to this file as well, as part of:
allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/spe.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/powerpc/booke/spe.c
diff -u src/sys/arch/powerpc/booke/spe.c:1.9 src/sys/arch/powerpc/booke/spe.c:1.10
--- src/sys/arch/powerpc/booke/spe.c:1.9 Thu Mar 16 16:13:20 2017
+++ src/sys/arch/powerpc/booke/spe.c Fri Mar 17 23:43:43 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: spe.c,v 1.9 2017/03/16 16:13:20 chs Exp $ */
+/* $NetBSD: spe.c,v 1.10 2017/03/17 23:43:43 chs Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spe.c,v 1.9 2017/03/16 16:13:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spe.c,v 1.10 2017/03/17 23:43:43 chs Exp $");
#include "opt_altivec.h"
@@ -149,9 +149,7 @@ vec_restore_from_mcontext(lwp_t *l, cons
struct pcb * const pcb = lwp_getpcb(l);
const union __vr *vr = mcp->__vrf.__vrs;
- KASSERT(l == curlwp);
-
- vec_save();
+ vec_save(l);
/* grab the accumulator */
pcb->pcb_vr.vreg[8][0] = vr->__vr32[2];
@@ -175,12 +173,10 @@ vec_save_to_mcontext(lwp_t *l, mcontext_
{
struct pcb * const pcb = lwp_getpcb(l);
- KASSERT(l == curlwp);
-
if (!vec_used_p(l))
return false;
- vec_save();
+ vec_save(l);
mcp->__gregs[_REG_MSR] |= PSL_SPV;