Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh5/sh5 add MD part of SA/pthread pagefault handlin...



details:   https://anonhg.NetBSD.org/src/rev/c9ebc8566753
branches:  trunk
changeset: 552101:c9ebc8566753
user:      cl <cl%NetBSD.org@localhost>
date:      Thu Sep 18 22:40:04 2003 +0000

description:
add MD part of SA/pthread pagefault handling on sh5

diffstat:

 sys/arch/sh5/sh5/trap.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 81efb8d062ec -r c9ebc8566753 sys/arch/sh5/sh5/trap.c
--- a/sys/arch/sh5/sh5/trap.c   Thu Sep 18 22:38:36 2003 +0000
+++ b/sys/arch/sh5/sh5/trap.c   Thu Sep 18 22:40:04 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.26 2003/09/08 08:01:52 scw Exp $    */
+/*     $NetBSD: trap.c,v 1.27 2003/09/18 22:40:04 cl Exp $     */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.26 2003/09/08 08:01:52 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.27 2003/09/18 22:40:04 cl Exp $");
 
 #include "opt_ddb.h"
 
@@ -304,6 +304,11 @@
                vm = p->p_vmspace;
                map = &vm->vm_map;
                va = trunc_page(vaddr);
+               if (l->l_flag & L_SA) {
+                       KDASSERT(p != NULL && p->p_sa != NULL);
+                       p->p_sa->sa_vp_faultaddr = (vaddr_t)vaddr;
+                       l->l_flag |= L_SA_PAGEFAULT;
+               }
                rv = uvm_fault(map, va, 0, ftype);
 
                /*
@@ -325,6 +330,8 @@
                                rv = EFAULT;
                }
 
+               l->l_flag &= ~L_SA_PAGEFAULT;
+
                if (rv == 0) {
                        if (traptype & T_USER)
                                userret(l);



Home | Main Index | Thread Index | Old Index