Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 In data_abort_handler(), honour pcb_onfau...



details:   https://anonhg.NetBSD.org/src/rev/beeb54613901
branches:  trunk
changeset: 555536:beeb54613901
user:      scw <scw%NetBSD.org@localhost>
date:      Thu Nov 20 14:44:36 2003 +0000

description:
In data_abort_handler(), honour pcb_onfault even in the case where
current_intr_depth > 0.

diffstat:

 sys/arch/arm/arm32/fault.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 616438a041d9 -r beeb54613901 sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c        Thu Nov 20 13:32:41 2003 +0000
+++ b/sys/arch/arm/arm32/fault.c        Thu Nov 20 14:44:36 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fault.c,v 1.44 2003/11/18 22:39:05 scw Exp $   */
+/*     $NetBSD: fault.c,v 1.45 2003/11/20 14:44:36 scw Exp $   */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
 #include "opt_kgdb.h"
 
 #include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.44 2003/11/18 22:39:05 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.45 2003/11/20 14:44:36 scw Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -396,12 +396,15 @@
                goto out;
        }
 
-#ifdef DIAGNOSTIC
        if (__predict_false(current_intr_depth > 0)) {
+               if (pcb->pcb_onfault) {
+                       tf->tf_r0 = EINVAL;
+                       tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault;
+                       return;
+               }
                printf("\nNon-emulated page fault with intr_depth > 0\n");
                dab_fatal(tf, fsr, far, l, NULL);
        }
-#endif
 
        onfault = pcb->pcb_onfault;
        pcb->pcb_onfault = NULL;



Home | Main Index | Thread Index | Old Index