aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-10-06 23:34:17 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2022-10-07 00:59:54 +1100
commit94746890202cf18e5266b4de77895243e55b0a79 (patch)
tree48cff7fbb413e25aeada2f40d2a35b673a8a32f1 /arch/powerpc/include/asm
parentpowerpc/64s/interrupt: Fix stack frame regs marker (diff)
downloadlinux-dev-94746890202cf18e5266b4de77895243e55b0a79.tar.xz
linux-dev-94746890202cf18e5266b4de77895243e55b0a79.zip
powerpc: Don't add __powerpc_ prefix to syscall entry points
When using syscall wrappers the __SYSCALL_DEFINEx() and related macros add a "__powerpc_" prefix to all syscall entry points. So for example sys_mmap becomes __powerpc_sys_mmap. This risks breaking workflows and tools that expect the old naming scheme. At a minimum setting a breakpoint on eg. sys_mmap with gdb no longer works. There seems to be no compelling reason to add the "__powerpc_" prefix, other than that it follows what some other arches do (x86, arm64, s390). But unlike other arches powerpc doesn't always enable syscall wrappers, so the syscall entry points can change name depending on CONFIG options. For those reasons drop the "__powerpc_" prefix, reverting to the existing naming. Doing so reveals two prototypes in signal.h that have the incorrect type when syscall wrappers are enabled. There are already prototypes for both functions in syscalls.h, so drop the ones from signal.h. Fixes: 7e92e01b7245 ("powerpc: Provide syscall wrapper") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20221006135940.1223988-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/syscall_wrapper.h18
-rw-r--r--arch/powerpc/include/asm/syscalls.h2
2 files changed, 9 insertions, 11 deletions
diff --git a/arch/powerpc/include/asm/syscall_wrapper.h b/arch/powerpc/include/asm/syscall_wrapper.h
index 75b41b173f7a..67486c67e8a2 100644
--- a/arch/powerpc/include/asm/syscall_wrapper.h
+++ b/arch/powerpc/include/asm/syscall_wrapper.h
@@ -16,11 +16,11 @@ struct pt_regs;
,,regs->gpr[6],,regs->gpr[7],,regs->gpr[8])
#define __SYSCALL_DEFINEx(x, name, ...) \
- long __powerpc_sys##name(const struct pt_regs *regs); \
- ALLOW_ERROR_INJECTION(__powerpc_sys##name, ERRNO); \
+ long sys##name(const struct pt_regs *regs); \
+ ALLOW_ERROR_INJECTION(sys##name, ERRNO); \
static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
- long __powerpc_sys##name(const struct pt_regs *regs) \
+ long sys##name(const struct pt_regs *regs) \
{ \
return __se_sys##name(SC_POWERPC_REGS_TO_ARGS(x,__VA_ARGS__)); \
} \
@@ -35,17 +35,15 @@ struct pt_regs;
#define SYSCALL_DEFINE0(sname) \
SYSCALL_METADATA(_##sname, 0); \
- long __powerpc_sys_##sname(const struct pt_regs *__unused); \
- ALLOW_ERROR_INJECTION(__powerpc_sys_##sname, ERRNO); \
- long __powerpc_sys_##sname(const struct pt_regs *__unused)
+ long sys_##sname(const struct pt_regs *__unused); \
+ ALLOW_ERROR_INJECTION(sys_##sname, ERRNO); \
+ long sys_##sname(const struct pt_regs *__unused)
#define COND_SYSCALL(name) \
- long __powerpc_sys_##name(const struct pt_regs *regs); \
- long __weak __powerpc_sys_##name(const struct pt_regs *regs) \
+ long sys_##name(const struct pt_regs *regs); \
+ long __weak sys_##name(const struct pt_regs *regs) \
{ \
return sys_ni_syscall(); \
}
-#define SYS_NI(name) SYSCALL_ALIAS(__powerpc_sys_##name, sys_ni_posix_timers);
-
#endif // __ASM_POWERPC_SYSCALL_WRAPPER_H
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h
index 49bbc3e0733d..9840d572da55 100644
--- a/arch/powerpc/include/asm/syscalls.h
+++ b/arch/powerpc/include/asm/syscalls.h
@@ -124,7 +124,7 @@ long sys_ppc_fadvise64_64(int fd, int advice,
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
#define __SYSCALL(nr, entry) \
- long __powerpc_##entry(const struct pt_regs *regs);
+ long entry(const struct pt_regs *regs);
#ifdef CONFIG_PPC64
#include <asm/syscall_table_64.h>