Module Name: src Committed By: chs Date: Wed Jul 7 01:21:15 UTC 2010
Modified Files: src/sys/arch/i386/i386: copy.S Log Message: return the error from fault handler in ucas_fault rather than forcing EFAULT. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/i386/copy.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/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.21 src/sys/arch/i386/i386/copy.S:1.22 --- src/sys/arch/i386/i386/copy.S:1.21 Fri Nov 27 03:23:10 2009 +++ src/sys/arch/i386/i386/copy.S Wed Jul 7 01:21:15 2010 @@ -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().