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
This commit is contained in:
Rohan McLure 2022-09-21 16:55:54 +10:00 committed by Michael Ellerman
parent b7fa9ce86d
commit ac17defbeb
1 changed files with 5 additions and 1 deletions

View File

@ -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,