Skip to content

Commit

Permalink
powerpc: Provide do_ppc64_personality helper
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rohan McLure authored and Michael Ellerman committed Sep 28, 2022
1 parent b7fa9ce commit ac17def
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/powerpc/kernel/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
Expand Down

0 comments on commit ac17def

Please sign in to comment.