Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm32/arm32 Add checks (make non DIAGNOSTIC) to mak...



details:   https://anonhg.NetBSD.org/src/rev/5ae446c06268
branches:  trunk
changeset: 511782:5ae446c06268
user:      chris <chris%NetBSD.org@localhost>
date:      Tue Jun 26 22:09:19 2001 +0000

description:
Add checks (make non DIAGNOSTIC) to make sure that we never call uvm_fault from an interrupt.

diffstat:

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

diffs (35 lines):

diff -r 1b279abf399a -r 5ae446c06268 sys/arch/arm32/arm32/fault.c
--- a/sys/arch/arm32/arm32/fault.c      Tue Jun 26 22:01:45 2001 +0000
+++ b/sys/arch/arm32/arm32/fault.c      Tue Jun 26 22:09:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fault.c,v 1.55 2001/06/19 13:42:13 wiz Exp $   */
+/*     $NetBSD: fault.c,v 1.56 2001/06/26 22:09:19 chris Exp $ */
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -405,7 +405,6 @@
                    pmap_handled_emulation(map->pmap, va))
                        goto out;
 
-#ifdef DIAGNOSTIC
                if (current_intr_depth > 0) {
 #ifdef DDB
                        printf("Non-emulated page fault with intr_depth > 0\n");
@@ -416,7 +415,6 @@
                        panic("Fault with intr_depth > 0");
 #endif /* DDB */
                }
-#endif /* DIAGNOSTIC */
 
                onfault = pcb->pcb_onfault;
                pcb->pcb_onfault = NULL;
@@ -620,6 +618,9 @@
        if (va >= VM_MAXUSER_ADDRESS)
                return (EFAULT);
 
+       /* uvm_fault can't be called from within an interrupt */
+       KASSERT(current_intr_depth == 0);
+       
        vm = curproc->p_vmspace;
        error = uvm_fault(&vm->vm_map, va, 0, VM_PROT_READ | VM_PROT_WRITE);
        return error;



Home | Main Index | Thread Index | Old Index