Commit ac17defb authored by Rohan McLure's avatar Rohan McLure Committed by Michael Ellerman

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: default avatarRohan McLure <rmclure@linux.ibm.com>
Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220921065605.1051927-15-rmclure@linux.ibm.com
parent b7fa9ce8
...@@ -74,7 +74,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len, ...@@ -74,7 +74,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len,
} }
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
long ppc64_personality(unsigned long personality) static long do_ppc64_personality(unsigned long personality)
{ {
long ret; long ret;
...@@ -86,6 +86,10 @@ long ppc64_personality(unsigned long personality) ...@@ -86,6 +86,10 @@ long ppc64_personality(unsigned long personality)
ret = (ret & ~PER_MASK) | PER_LINUX; ret = (ret & ~PER_MASK) | PER_LINUX;
return ret; return ret;
} }
long ppc64_personality(unsigned long personality)
{
return do_ppc64_personality(personality);
}
#endif #endif
long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment