Module Name: src
Committed By: chs
Date: Sun Aug 8 18:18:58 UTC 2010
Modified Files:
src/sys/arch/ia64/ia64: support.S
Log Message:
fix copy{in,out}{,str}() to return the error returned by uvm_fault().
part of PR 41813 that I missed earlier.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/support.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/ia64/ia64/support.S
diff -u src/sys/arch/ia64/ia64/support.S:1.5 src/sys/arch/ia64/ia64/support.S:1.6
--- src/sys/arch/ia64/ia64/support.S:1.5 Fri Nov 27 03:23:10 2009
+++ src/sys/arch/ia64/ia64/support.S Sun Aug 8 18:18:58 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: support.S,v 1.5 2009/11/27 03:23:10 rmind Exp $ */
+/* $NetBSD: support.S,v 1.6 2010/08/08 18:18:58 chs Exp $ */
/*-
* Copyright (c) 1998 Doug Rabson
@@ -57,7 +57,6 @@
#include <machine/asm.h>
#include <machine/ia64_cpu.h>
-#include <machine/vmparam.h>
#include "assym.h"
@@ -708,7 +707,7 @@
;;
cmp.geu p6,p0=in0,loc2 // is in user space.
;;
-(p6) br.cond.spnt.few copyerr // if it's not, error out.
+(p6) br.cond.spnt.few copyefault // if it's not, error out.
movl r14=copyerr // set up fault handler.
add r15=PC_CURLWP,r13 // find curthread
;;
@@ -747,7 +746,7 @@
;;
cmp.geu p6,p0=in1,loc2 // is in user space.
;;
-(p6) br.cond.spnt.few copyerr // if it's not, error out.
+(p6) br.cond.spnt.few copyefault // if it's not, error out.
movl r14=copyerr // set up fault handler.
add r15=PC_CURLWP,r13 // find curthread
;;
@@ -898,7 +897,7 @@
;;
cmp.geu p6,p0=in0,loc2 // is in user space.
;;
-(p6) br.cond.spnt.few copyerr // if it's not, error out.
+(p6) br.cond.spnt.few copyefault // if it's not, error out.
movl r14=copyerr // set up fault handler.
add r15=PC_CURLWP,r13 // find curthread
;;
@@ -936,7 +935,7 @@
;;
cmp.geu p6,p0=in1,loc2 // is in user space.
;;
-(p6) br.cond.spnt.few copyerr // if it's not, error out.
+(p6) br.cond.spnt.few copyefault // if it's not, error out.
movl r14=copyerr // set up fault handler.
add r15=PC_CURLWP,r13 // find curthread
;;
@@ -969,10 +968,21 @@
add r14=PCB_ONFAULT,r14 ;; // &curthread->td_pcb->pcb_onfault
st8 [r14]=r0 // reset fault handler
- mov ret0=EFAULT // return EFAULT
br.ret.sptk.few rp
END(copyerr)
+ENTRY(copyefault, 0)
+ add r14=PC_CURLWP,r13 ;; // find curthread
+ ld8 r14=[r14] ;;
+ add r14=L_PCB,r14 ;; // curthread->td_addr
+ ld8 r14=[r14] ;;
+ add r14=PCB_ONFAULT,r14 ;; // &curthread->td_pcb->pcb_onfault
+ st8 [r14]=r0 // reset fault handler
+
+ mov ret0=EFAULT // return EFAULT
+ br.ret.sptk.few rp
+END(copyefault)
+
#if defined(GPROF)
/*
* Important registers: