|
@@ -3,6 +3,7 @@
|
|
*
|
|
*
|
|
* (C) Copyright 1998 Linus Torvalds
|
|
* (C) Copyright 1998 Linus Torvalds
|
|
* (C) Copyright 2005 Andi Kleen
|
|
* (C) Copyright 2005 Andi Kleen
|
|
|
|
+ * (C) Copyright 2008 Glauber Costa
|
|
*
|
|
*
|
|
* These functions have a non-standard call interface
|
|
* These functions have a non-standard call interface
|
|
* to make them more efficient, especially as they
|
|
* to make them more efficient, especially as they
|
|
@@ -13,13 +14,13 @@
|
|
/*
|
|
/*
|
|
* __get_user_X
|
|
* __get_user_X
|
|
*
|
|
*
|
|
- * Inputs: %rax contains the address.
|
|
|
|
|
|
+ * Inputs: %[r|e]ax contains the address.
|
|
* The register is modified, but all changes are undone
|
|
* The register is modified, but all changes are undone
|
|
* before returning because the C code doesn't know about it.
|
|
* before returning because the C code doesn't know about it.
|
|
*
|
|
*
|
|
- * Outputs: %rax is error code (0 or -EFAULT)
|
|
|
|
- * %rdx contains zero-extended value
|
|
|
|
- *
|
|
|
|
|
|
+ * Outputs: %[r|e]ax is error code (0 or -EFAULT)
|
|
|
|
+ * %[r|e]dx contains zero-extended value
|
|
|
|
+ *
|
|
*
|
|
*
|
|
* These functions should not modify any other registers,
|
|
* These functions should not modify any other registers,
|
|
* as they get called from within inline assembly.
|
|
* as they get called from within inline assembly.
|
|
@@ -71,6 +72,7 @@ ENTRY(__get_user_4)
|
|
CFI_ENDPROC
|
|
CFI_ENDPROC
|
|
ENDPROC(__get_user_4)
|
|
ENDPROC(__get_user_4)
|
|
|
|
|
|
|
|
+#ifdef CONFIG_X86_64
|
|
ENTRY(__get_user_8)
|
|
ENTRY(__get_user_8)
|
|
CFI_STARTPROC
|
|
CFI_STARTPROC
|
|
add $7,%_ASM_AX
|
|
add $7,%_ASM_AX
|
|
@@ -83,6 +85,7 @@ ENTRY(__get_user_8)
|
|
ret
|
|
ret
|
|
CFI_ENDPROC
|
|
CFI_ENDPROC
|
|
ENDPROC(__get_user_8)
|
|
ENDPROC(__get_user_8)
|
|
|
|
+#endif
|
|
|
|
|
|
bad_get_user:
|
|
bad_get_user:
|
|
CFI_STARTPROC
|
|
CFI_STARTPROC
|
|
@@ -96,5 +99,6 @@ END(bad_get_user)
|
|
_ASM_PTR 1b,bad_get_user
|
|
_ASM_PTR 1b,bad_get_user
|
|
_ASM_PTR 2b,bad_get_user
|
|
_ASM_PTR 2b,bad_get_user
|
|
_ASM_PTR 3b,bad_get_user
|
|
_ASM_PTR 3b,bad_get_user
|
|
|
|
+#ifdef CONFIG_X86_64
|
|
_ASM_PTR 4b,bad_get_user
|
|
_ASM_PTR 4b,bad_get_user
|
|
-.previous
|
|
|
|
|
|
+#endif
|