powerpc/uaccess: Add pre-update addressing to __get_user_asm() and __put_user_asm()
Enable pre-update addressing mode in __get_user_asm() and __put_user_asm() Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/13041c7df39e89ddf574ea0cdc6dedfdd9734140.1597235091.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
c20beffeec
commit
2f279eeb68
|
@ -158,7 +158,7 @@ extern long __put_user_bad(void);
|
|||
*/
|
||||
#define __put_user_asm(x, addr, err, op) \
|
||||
__asm__ __volatile__( \
|
||||
"1: " op "%X2 %1,%2 # put_user\n" \
|
||||
"1: " op "%U2%X2 %1,%2 # put_user\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: li %0,%3\n" \
|
||||
|
@ -166,7 +166,7 @@ extern long __put_user_bad(void);
|
|||
".previous\n" \
|
||||
EX_TABLE(1b, 3b) \
|
||||
: "=r" (err) \
|
||||
: "r" (x), "m" (*addr), "i" (-EFAULT), "0" (err))
|
||||
: "r" (x), "m<>" (*addr), "i" (-EFAULT), "0" (err))
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define __put_user_asm2(x, ptr, retval) \
|
||||
|
@ -316,7 +316,7 @@ extern long __get_user_bad(void);
|
|||
|
||||
#define __get_user_asm(x, addr, err, op) \
|
||||
__asm__ __volatile__( \
|
||||
"1: "op"%X2 %1, %2 # get_user\n" \
|
||||
"1: "op"%U2%X2 %1, %2 # get_user\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: li %0,%3\n" \
|
||||
|
@ -325,7 +325,7 @@ extern long __get_user_bad(void);
|
|||
".previous\n" \
|
||||
EX_TABLE(1b, 3b) \
|
||||
: "=r" (err), "=r" (x) \
|
||||
: "m" (*addr), "i" (-EFAULT), "0" (err))
|
||||
: "m<>" (*addr), "i" (-EFAULT), "0" (err))
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define __get_user_asm2(x, addr, err) \
|
||||
|
|
Loading…
Reference in New Issue