Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/include Implement __HAVE_RAS. Unlike most impl...
details: https://anonhg.NetBSD.org/src/rev/7d5f422bdf10
branches: trunk
changeset: 779387:7d5f422bdf10
user: matt <matt%NetBSD.org@localhost>
date: Fri May 25 12:32:48 2012 +0000
description:
Implement __HAVE_RAS. Unlike most implementation, this is done in userret
instead of cpu_switchto since we already accessing the proc structure so
the additional overhead of check p_raslist is minimal.
diffstat:
sys/arch/vax/include/types.h | 5 ++++-
sys/arch/vax/include/userret.h | 12 +++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r 244cd0e9d383 -r 7d5f422bdf10 sys/arch/vax/include/types.h
--- a/sys/arch/vax/include/types.h Fri May 25 10:53:46 2012 +0000
+++ b/sys/arch/vax/include/types.h Fri May 25 12:32:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.44 2012/01/17 20:34:57 joerg Exp $ */
+/* $NetBSD: types.h,v 1.45 2012/05/25 12:32:48 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -78,6 +78,9 @@
#define __HAVE_CPU_DATA_FIRST
#define __HAVE_MM_MD_READWRITE
#define __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#ifdef _KERNEL
+#define __HAVE_RAS
+#endif
#define __HAVE___LWP_GETPRIVATE_FAST
#define __HAVE_NO___THREAD
diff -r 244cd0e9d383 -r 7d5f422bdf10 sys/arch/vax/include/userret.h
--- a/sys/arch/vax/include/userret.h Fri May 25 10:53:46 2012 +0000
+++ b/sys/arch/vax/include/userret.h Fri May 25 12:32:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: userret.h,v 1.13 2011/07/03 02:18:20 matt Exp $ */
+/* $NetBSD: userret.h,v 1.14 2012/05/25 12:32:48 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -31,6 +31,7 @@
*/
#include <sys/userret.h>
+#include <sys/ras.h>
/*
* Common code used by various exception handlers to
@@ -44,6 +45,15 @@
mi_userret(l);
/*
+ * Check to see if a RAS was interrupted and restart it if it was.
+ */
+ if (__predict_false(p->p_raslist != NULL)) {
+ void * const ras_pc = ras_lookup(p, (void *) tf->tf_pc);
+ if (ras_pc != (void *) -1)
+ tf->tf_pc = (vaddr_t) ras_pc;
+ }
+
+ /*
* If profiling, charge system time to the trapped pc.
*/
if ((p->p_stflag & PST_PROFIL) != 0) {
Home |
Main Index |
Thread Index |
Old Index