aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-02-12 18:37:02 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-02-12 18:37:02 -0500
commitff52c3b02b3f73178bfe0c219cd22abdcb0e46c3 (patch)
tree91f54678d06725e0404853a1bbea30586fdae082 /arch/x86
parent3578baaed4613a9fc09bab9f79f6ce2ac682e8a3 (diff)
x86, doc: Clarify the use of asm("%edx") in uaccess.h
Put in a comment that explains that the use of asm("%edx") in uaccess.h doesn't actually necessarily mean %edx alone. Cc: Jamie Lokier <jamie@shareable.org> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: H. J. Lu <hjl.tools@gmail.com> Link: http://lkml.kernel.org/r/511ACDFB.1050707@zytor.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/uaccess.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index d710a2555fd6..5ee26875baea 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -148,9 +148,16 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
148 * 148 *
149 * Returns zero on success, or -EFAULT on error. 149 * Returns zero on success, or -EFAULT on error.
150 * On error, the variable @x is set to zero. 150 * On error, the variable @x is set to zero.
151 * 151 */
152/*
152 * Careful: we have to cast the result to the type of the pointer 153 * Careful: we have to cast the result to the type of the pointer
153 * for sign reasons. 154 * for sign reasons.
155 *
156 * The use of %edx as the register specifier is a bit of a
157 * simplification, as gcc only cares about it as the starting point
158 * and not size: for a 64-bit value it will use %ecx:%edx on 32 bits
159 * (%ecx being the next register in gcc's x86 register sequence), and
160 * %rdx on 64 bits.
154 */ 161 */
155#define get_user(x, ptr) \ 162#define get_user(x, ptr) \
156({ \ 163({ \