Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include Make sure to clear PSL_SE before go...



details:   https://anonhg.NetBSD.org/src/rev/f28e3b2431a4
branches:  trunk
changeset: 794261:f28e3b2431a4
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Mar 09 23:09:32 2014 +0000

description:
Make sure to clear PSL_SE before going to usermode on BOOKE
Revert back to testing PSL_SE in the trapframe and not mdlwp md_flags

diffstat:

 sys/arch/powerpc/include/userret.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (25 lines):

diff -r b46c1dfb47b8 -r f28e3b2431a4 sys/arch/powerpc/include/userret.h
--- a/sys/arch/powerpc/include/userret.h        Sun Mar 09 23:01:11 2014 +0000
+++ b/sys/arch/powerpc/include/userret.h        Sun Mar 09 23:09:32 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: userret.h,v 1.25 2014/03/09 22:31:25 matt Exp $        */
+/*     $NetBSD: userret.h,v 1.26 2014/03/09 23:09:32 matt Exp $        */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -75,11 +75,11 @@
 #ifdef PPC_BOOKE
        /*
         * 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.
+        * completion exception but it needs PSL_DE to fire.  Instead we
+        * use IAC1/IAC2 to match the next PC.
         */
-       if (__predict_false(l->l_md.md_flags & PSL_SE)) {
+       if (__predict_false(tf->tf_ssr1 & PSL_SE)) {
+               tf->tf_ssr1 &= ~PSL_SE;
                extern void booke_sstep(struct trapframe *); /* ugly */
                booke_sstep(tf);
        }



Home | Main Index | Thread Index | Old Index