Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc Don't test for PSL_SE in tf_srr1 since will...



details:   https://anonhg.NetBSD.org/src/rev/9fcde59b2edd
branches:  trunk
changeset: 327519:9fcde59b2edd
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Mar 09 22:31:25 2014 +0000

description:
Don't test for PSL_SE in tf_srr1 since will be cleared on the next exception.
Keep a copy of it in l_md.md_flags which will be preserved.

diffstat:

 sys/arch/powerpc/include/userret.h         |  12 ++++++------
 sys/arch/powerpc/powerpc/process_machdep.c |  11 +++++++----
 2 files changed, 13 insertions(+), 10 deletions(-)

diffs (61 lines):

diff -r 783d1bf4a29c -r 9fcde59b2edd sys/arch/powerpc/include/userret.h
--- a/sys/arch/powerpc/include/userret.h        Sun Mar 09 22:01:31 2014 +0000
+++ b/sys/arch/powerpc/include/userret.h        Sun Mar 09 22:31:25 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: userret.h,v 1.24 2012/05/26 00:31:07 matt Exp $        */
+/*     $NetBSD: userret.h,v 1.25 2014/03/09 22:31:25 matt Exp $        */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -74,12 +74,12 @@
 #endif
 #ifdef PPC_BOOKE
        /*
-        * BookE doesn't PSL_SE but it does have a debug instruction completion
-        * exception but it needs PSL_DE to fire.  Since we don't want it to
-        * happen in the kernel, we must disable PSL_DE and let it get
-        * restored by rfi/rfci.
+        * BookE doesn't have PSL_SE but it does have a debug instruction
+        * completion exception but it needs PSL_DE to fire.  Since we don't
+        * want it to happen in the kernel, we must disable PSL_DE and let
+        * it get restored by rfi/rfci.
         */
-       if (__predict_false(tf->tf_srr1 & PSL_SE)) {
+       if (__predict_false(l->l_md.md_flags & PSL_SE)) {
                extern void booke_sstep(struct trapframe *); /* ugly */
                booke_sstep(tf);
        }
diff -r 783d1bf4a29c -r 9fcde59b2edd sys/arch/powerpc/powerpc/process_machdep.c
--- a/sys/arch/powerpc/powerpc/process_machdep.c        Sun Mar 09 22:01:31 2014 +0000
+++ b/sys/arch/powerpc/powerpc/process_machdep.c        Sun Mar 09 22:31:25 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.36 2014/01/04 00:10:03 dsl Exp $ */
+/*     $NetBSD: process_machdep.c,v 1.37 2014/03/09 22:31:25 matt Exp $        */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.36 2014/01/04 00:10:03 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.37 2014/03/09 22:31:25 matt Exp $");
 
 #include "opt_altivec.h"
 
@@ -137,10 +137,13 @@
 {
        struct trapframe * const tf = l->l_md.md_utf;
        
-       if (sstep)
+       if (sstep) {
                tf->tf_srr1 |= PSL_SE;
-       else
+               l->l_md.md_flags |= PSL_SE;
+       } else {
                tf->tf_srr1 &= ~PSL_SE;
+               l->l_md.md_flags &= ~PSL_SE;
+       }
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index