Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/powerpc/include Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/ba0e54f48033
branches:  netbsd-6
changeset: 774223:ba0e54f48033
user:      riz <riz%NetBSD.org@localhost>
date:      Wed Jun 13 19:44:11 2012 +0000

description:
Pull up following revision(s) (requested by matt in ticket #340):
        sys/arch/powerpc/include/types.h: revision 1.47
        sys/arch/powerpc/include/userret.h: revision 1.24
Add __HAVE_RAS support.  Do it in userret.

diffstat:

 sys/arch/powerpc/include/types.h   |   5 ++++-
 sys/arch/powerpc/include/userret.h |  15 ++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r 66697a7b8bcb -r ba0e54f48033 sys/arch/powerpc/include/types.h
--- a/sys/arch/powerpc/include/types.h  Wed Jun 13 19:42:56 2012 +0000
+++ b/sys/arch/powerpc/include/types.h  Wed Jun 13 19:44:11 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.46 2011/07/17 23:23:54 dyoung Exp $        */
+/*     $NetBSD: types.h,v 1.46.8.1 2012/06/13 19:44:11 riz Exp $       */
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -95,5 +95,8 @@
 
 #define        __HAVE_MM_MD_DIRECT_MAPPED_PHYS
 #define        __HAVE_MM_MD_KERNACC
+#if defined(_KERNEL)
+#define        __HAVE_RAS
+#endif
 
 #endif /* _MACHTYPES_H_ */
diff -r 66697a7b8bcb -r ba0e54f48033 sys/arch/powerpc/include/userret.h
--- a/sys/arch/powerpc/include/userret.h        Wed Jun 13 19:42:56 2012 +0000
+++ b/sys/arch/powerpc/include/userret.h        Wed Jun 13 19:44:11 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: userret.h,v 1.22 2011/09/27 01:02:36 jym Exp $ */
+/*     $NetBSD: userret.h,v 1.22.8.1 2012/06/13 19:44:11 riz Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,6 +35,7 @@
 #include "opt_altivec.h"
 
 #include <sys/userret.h>
+#include <sys/ras.h>
 
 #include <powerpc/fpu.h>
 #include <powerpc/psl.h>
@@ -79,4 +80,16 @@
                booke_sstep(tf);
        }
 #endif
+
+#ifdef __HAVE_RAS
+       /*
+        * Check to see if a RAS was interrupted and restart it if it was.      
+        */
+       struct proc * const p = l->l_proc;
+       if (__predict_false(p->p_raslist != NULL)) {
+               void * const ras_pc = ras_lookup(p, (void *) tf->tf_srr0);
+               if (ras_pc != (void *) -1)
+                       tf->tf_srr0 = (vaddr_t) ras_pc;
+       }
+#endif
 }



Home | Main Index | Thread Index | Old Index