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 add MD part of SA/pthread pagefault handl...
details: https://anonhg.NetBSD.org/src/rev/a5ac8f7da682
branches: trunk
changeset: 552099:a5ac8f7da682
user: cl <cl%NetBSD.org@localhost>
date: Thu Sep 18 22:37:38 2003 +0000
description:
add MD part of SA/pthread pagefault handling on arm
diffstat:
sys/arch/arm/arm32/fault.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r b3faf410a73c -r a5ac8f7da682 sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c Thu Sep 18 22:36:32 2003 +0000
+++ b/sys/arch/arm/arm32/fault.c Thu Sep 18 22:37:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.31 2003/07/09 20:14:15 thorpej Exp $ */
+/* $NetBSD: fault.c,v 1.32 2003/09/18 22:37:38 cl Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
#include "opt_pmap_debug.h"
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.31 2003/07/09 20:14:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.32 2003/09/18 22:37:38 cl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -469,8 +469,14 @@
return;
}
map = kernel_map;
- } else
+ } else {
map = &vm->vm_map;
+ if (l->l_flag & L_SA) {
+ KDASSERT(p != NULL && p->p_sa != NULL);
+ p->p_sa->sa_vp_faultaddr = (vaddr_t)fault_address;
+ l->l_flag |= L_SA_PAGEFAULT;
+ }
+ }
#ifdef PMAP_DEBUG
if (pmap_debug_level >= 0)
@@ -526,6 +532,8 @@
pcb->pcb_onfault = NULL;
rv = uvm_fault(map, va, 0, ftype);
pcb->pcb_onfault = onfault;
+ if (map != kernel_map)
+ l->l_flag &= ~L_SA_PAGEFAULT;
if (rv == 0) {
if (user != 0) /* Record any stack growth... */
uvm_grow(p, trunc_page(va));
Home |
Main Index |
Thread Index |
Old Index