Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc Make sure to enable the vector unit in the ...



details:   https://anonhg.NetBSD.org/src/rev/1dffe5c5262b
branches:  trunk
changeset: 764730:1dffe5c5262b
user:      matt <matt%NetBSD.org@localhost>
date:      Mon May 02 06:43:16 2011 +0000

description:
Make sure to enable the vector unit in the PSL when returning to userland.

diffstat:

 sys/arch/powerpc/booke/spe.c   |  5 +++--
 sys/arch/powerpc/oea/altivec.c |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r e5cff53d73e5 -r 1dffe5c5262b sys/arch/powerpc/booke/spe.c
--- a/sys/arch/powerpc/booke/spe.c      Mon May 02 06:37:47 2011 +0000
+++ b/sys/arch/powerpc/booke/spe.c      Mon May 02 06:43:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spe.c,v 1.3 2011/05/02 02:01:32 matt Exp $     */
+/*     $NetBSD: spe.c,v 1.4 2011/05/02 06:43:16 matt Exp $     */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spe.c,v 1.3 2011/05/02 02:01:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spe.c,v 1.4 2011/05/02 06:43:16 matt Exp $");
 
 #include "opt_altivec.h"
 
@@ -101,6 +101,7 @@
         * Note that vector has now been used.
         */
        l->l_md.md_flags |= MDLWP_USEDVEC;
+       l->l_md.md_utf->tf_srr1 |= PSL_SPV;
 }
 
 void
diff -r e5cff53d73e5 -r 1dffe5c5262b sys/arch/powerpc/oea/altivec.c
--- a/sys/arch/powerpc/oea/altivec.c    Mon May 02 06:37:47 2011 +0000
+++ b/sys/arch/powerpc/oea/altivec.c    Mon May 02 06:43:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: altivec.c,v 1.22 2011/05/02 02:01:33 matt Exp $        */
+/*     $NetBSD: altivec.c,v 1.23 2011/05/02 06:43:16 matt Exp $        */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.22 2011/05/02 02:01:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.23 2011/05/02 06:43:16 matt Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -105,6 +105,7 @@
         * Mark vector registers as modified.
         */
        l->l_md.md_flags |= MDLWP_USEDVEC;
+       l->l_md.md_utf->tf_srr1 |= PSL_VEC;
 }
 
 void



Home | Main Index | Thread Index | Old Index