diff options
author | Rohan McLure <rmclure@linux.ibm.com> | 2022-09-21 09:55:54 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-09-28 12:22:08 +0300 |
commit | ac17defbeb4e8285c5b9752164b1d68b13bf3e3b (patch) | |
tree | 5bcf6cafed3f93b074b05d5262738dd388f32603 /arch/powerpc/kernel/syscalls.c | |
parent | b7fa9ce86d32baf2a3a8bf8fdaa44870084edd85 (diff) | |
download | linux-ac17defbeb4e8285c5b9752164b1d68b13bf3e3b.tar.xz |
powerpc: Provide do_ppc64_personality helper
Avoid duplication in future patch that will define the ppc64_personality
syscall handler in terms of the SYSCALL_DEFINE and COMPAT_SYSCALL_DEFINE
macros, by extracting the common body of ppc64_personality into a helper
function.
Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220921065605.1051927-15-rmclure@linux.ibm.com
Diffstat (limited to 'arch/powerpc/kernel/syscalls.c')
-rw-r--r-- | arch/powerpc/kernel/syscalls.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index e84a523cd65e..8d4b7f6d7cf3 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c @@ -74,7 +74,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len, } #ifdef CONFIG_PPC64 -long ppc64_personality(unsigned long personality) +static long do_ppc64_personality(unsigned long personality) { long ret; @@ -86,6 +86,10 @@ long ppc64_personality(unsigned long personality) ret = (ret & ~PER_MASK) | PER_LINUX; return ret; } +long ppc64_personality(unsigned long personality) +{ + return do_ppc64_personality(personality); +} #endif long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, |