diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-03-10 17:46:41 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-04-03 21:21:32 +1100 |
commit | 9bd68dc5d7463cb959bff9ac4b6c7e578171de35 (patch) | |
tree | d942ff2ed1f7784977a5c59d6ae84170a8d792ad | |
parent | 8cdf748d557f15ae6f9e0d4108cc3ea6e1ee4419 (diff) | |
download | linux-9bd68dc5d7463cb959bff9ac4b6c7e578171de35.tar.bz2 |
powerpc/uaccess: Define ___get_user_instr() for ppc32
Define simple ___get_user_instr() for ppc32 instead of
defining ppc32 versions of the three get_user_instr()
helpers.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/e02f83ec74f26d76df2874f0ce4d5cc69c3469ae.1615398265.git.christophe.leroy@csgroup.eu
-rw-r--r-- | arch/powerpc/include/asm/uaccess.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h index 57d7b1bfb7a2..250f535c0874 100644 --- a/arch/powerpc/include/asm/uaccess.h +++ b/arch/powerpc/include/asm/uaccess.h @@ -81,6 +81,10 @@ static inline bool __access_ok(unsigned long addr, unsigned long size) } \ __gui_ret; \ }) +#else /* !CONFIG_PPC64 */ +#define ___get_user_instr(gu_op, dest, ptr) \ + gu_op((dest).val, (u32 __user *)(ptr)) +#endif /* CONFIG_PPC64 */ #define get_user_instr(x, ptr) \ ___get_user_instr(get_user, x, ptr) @@ -91,18 +95,6 @@ static inline bool __access_ok(unsigned long addr, unsigned long size) #define __get_user_instr_inatomic(x, ptr) \ ___get_user_instr(__get_user_inatomic, x, ptr) -#else /* !CONFIG_PPC64 */ -#define get_user_instr(x, ptr) \ - get_user((x).val, (u32 __user *)(ptr)) - -#define __get_user_instr(x, ptr) \ - __get_user_nocheck((x).val, (u32 __user *)(ptr), sizeof(u32), true) - -#define __get_user_instr_inatomic(x, ptr) \ - __get_user_nosleep((x).val, (u32 __user *)(ptr), sizeof(u32)) - -#endif /* CONFIG_PPC64 */ - extern long __put_user_bad(void); #define __put_user_size(x, ptr, size, retval) \ |