Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc Clear ownership bit after saving contents t...



details:   https://anonhg.NetBSD.org/src/rev/c3f6ec2cf8b7
branches:  trunk
changeset: 761316:c3f6ec2cf8b7
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jan 23 17:36:09 2011 +0000

description:
Clear ownership bit after saving contents to PCB.

diffstat:

 sys/arch/powerpc/oea/altivec.c |  10 +++++++---
 sys/arch/powerpc/powerpc/fpu.c |   9 ++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

diffs (66 lines):

diff -r 39764c7e48a3 -r c3f6ec2cf8b7 sys/arch/powerpc/oea/altivec.c
--- a/sys/arch/powerpc/oea/altivec.c    Sun Jan 23 17:15:15 2011 +0000
+++ b/sys/arch/powerpc/oea/altivec.c    Sun Jan 23 17:36:09 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: altivec.c,v 1.19 2011/01/18 02:25:42 matt Exp $        */
+/*     $NetBSD: altivec.c,v 1.20 2011/01/23 17:36:09 matt Exp $        */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.19 2011/01/18 02:25:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.20 2011/01/23 17:36:09 matt Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -140,12 +140,16 @@
                __asm volatile ("dssall; sync");
 
                /*
+                * Disclaim ownership.
+                */
+               l->l_md.md_flags &= ~MDLWP_OWNVEC;
+
+               /*
                 * Give up the VEC unit if are releasing it too.
                 */
                if (op == VEC_SAVE_AND_RELEASE)
                        ci->ci_veclwp = ci->ci_data.cpu_idlelwp;
        }
-       l->l_md.md_flags &= ~MDLWP_OWNVEC;
 
        /*
         * Restore MSR (turn off AltiVec)
diff -r 39764c7e48a3 -r c3f6ec2cf8b7 sys/arch/powerpc/powerpc/fpu.c
--- a/sys/arch/powerpc/powerpc/fpu.c    Sun Jan 23 17:15:15 2011 +0000
+++ b/sys/arch/powerpc/powerpc/fpu.c    Sun Jan 23 17:36:09 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.26 2011/01/18 02:25:43 matt Exp $    */
+/*     $NetBSD: fpu.c,v 1.27 2011/01/23 17:36:09 matt Exp $    */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.26 2011/01/18 02:25:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.27 2011/01/23 17:36:09 matt Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -107,7 +107,10 @@
 
                fpu_unload_to_fpreg(&pcb->pcb_fpu);
 
-               __asm volatile ("sync");
+               /*
+                * Disclaim ownership.
+                */
+               l->l_md.md_flags &= ~MDLWP_OWNFPU;
 
                if (op == FPU_SAVE_AND_RELEASE)
                        ci->ci_fpulwp = ci->ci_data.cpu_idlelwp;



Home | Main Index | Thread Index | Old Index