Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 return the error from fault handler in uc...



details:   https://anonhg.NetBSD.org/src/rev/18b51901c36b
branches:  trunk
changeset: 756130:18b51901c36b
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Jul 07 01:21:15 2010 +0000

description:
return the error from fault handler in ucas_fault
rather than forcing EFAULT.

diffstat:

 sys/arch/i386/i386/copy.S |  19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diffs (66 lines):

diff -r cc359d7ece93 -r 18b51901c36b sys/arch/i386/i386/copy.S
--- a/sys/arch/i386/i386/copy.S Wed Jul 07 01:20:49 2010 +0000
+++ b/sys/arch/i386/i386/copy.S Wed Jul 07 01:21:15 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copy.S,v 1.21 2009/11/27 03:23:10 rmind Exp $  */
+/*     $NetBSD: copy.S,v 1.22 2010/07/07 01:21:15 chs Exp $    */
 /*     NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $  */
 
 /*-
@@ -65,7 +65,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.21 2009/11/27 03:23:10 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.22 2010/07/07 01:21:15 chs Exp $");
 
 #include "assym.h"
 
@@ -98,8 +98,7 @@
  * Label must be before all copy functions.
  */
        .text
-
-x86_copyfunc_start:    .globl  x86_copyfunc_start
+LABEL(x86_copyfunc_start)
 
 /*
  * Handle deferred pmap switch.  We must re-enable preemption without
@@ -686,7 +685,7 @@
        movl    12(%esp), %ecx
        /* Fail if kernel-space */
        cmpl    $VM_MAXUSER_ADDRESS-4, %edx
-       ja      _C_LABEL(ucas_fault)
+       ja      _C_LABEL(ucas_efault)
        /* Label for fault handler */
 .Lucas32_start:
        /* Perform the CAS */
@@ -703,16 +702,14 @@
        ret
        DEFERRED_SWITCH_CALL
 
-/*
- * Fault handler for ucas_32().
- * Unset the handler and return the failure.
- */
+NENTRY(ucas_efault)
+       mov     $EFAULT, %eax
 NENTRY(ucas_fault)
-       movl    $EFAULT, %eax
        ret
 
 /*
  * int ucas_int(volatile int *uptr, int old, int new, int *ret);
+ * int ucas_ptr(volatile void **uptr, void *old, void *new, void **ret);
  */
 STRONG_ALIAS(ucas_ptr, ucas_32)
 STRONG_ALIAS(ucas_int, ucas_32)
@@ -782,7 +779,7 @@
 /*
  * Label must be after all copy functions.
  */
-x86_copyfunc_end:      .globl  x86_copyfunc_end
+LABEL(x86_copyfunc_end)
 
 /*
  * Fault table of copy functions for trap().



Home | Main Index | Thread Index | Old Index