aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/systbl.S
diff options
context:
space:
mode:
authorFiroz Khan <firoz.khan@linaro.org>2018-12-17 16:10:35 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-21 14:46:50 +1100
commitfbf508da744053ff289777d6dd6e11ca8682be49 (patch)
treeb61178f92da375be24c4d38941df6d7d0987978a /arch/powerpc/kernel/systbl.S
parentpowerpc: move macro definition from asm/systbl.h (diff)
downloadlinux-dev-fbf508da744053ff289777d6dd6e11ca8682be49.tar.xz
linux-dev-fbf508da744053ff289777d6dd6e11ca8682be49.zip
powerpc: split compat syscall table out from native table
PowerPC uses a syscall table with native and compat calls interleaved, which is a slightly simpler way to define two matching tables. As we move to having the tables generated, that advantage is no longer important, but the interleaved table gets in the way of using the same scripts as on the other archit- ectures. Split out a new compat_sys_call_table symbol that contains all the compat calls, and leave the main table for the nat- ive calls, to more closely match the method we use every- where else. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Firoz Khan <firoz.khan@linaro.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/systbl.S')
-rw-r--r--arch/powerpc/kernel/systbl.S35
1 files changed, 28 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index 9ff1913e9188..0fa84e1ed462 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -17,13 +17,13 @@
#include <asm/ppc_asm.h>
#ifdef CONFIG_PPC64
-#define SYSCALL(func) .8byte DOTSYM(sys_##func),DOTSYM(sys_##func)
-#define COMPAT_SYS(func) .8byte DOTSYM(sys_##func),DOTSYM(compat_sys_##func)
-#define PPC_SYS(func) .8byte DOTSYM(ppc_##func),DOTSYM(ppc_##func)
-#define OLDSYS(func) .8byte DOTSYM(sys_ni_syscall),DOTSYM(sys_ni_syscall)
-#define SYS32ONLY(func) .8byte DOTSYM(sys_ni_syscall),DOTSYM(compat_sys_##func)
-#define PPC64ONLY(func) .8byte DOTSYM(ppc_##func),DOTSYM(sys_ni_syscall)
-#define SYSX(f, f3264, f32) .8byte DOTSYM(f),DOTSYM(f3264)
+#define SYSCALL(func) .8byte DOTSYM(sys_##func)
+#define COMPAT_SYS(func) .8byte DOTSYM(sys_##func)
+#define PPC_SYS(func) .8byte DOTSYM(ppc_##func)
+#define OLDSYS(func) .8byte DOTSYM(sys_ni_syscall)
+#define SYS32ONLY(func) .8byte DOTSYM(sys_ni_syscall)
+#define PPC64ONLY(func) .8byte DOTSYM(ppc_##func)
+#define SYSX(f, f3264, f32) .8byte DOTSYM(f)
#else
#define SYSCALL(func) .long sys_##func
#define COMPAT_SYS(func) .long sys_##func
@@ -46,6 +46,27 @@
.globl sys_call_table
sys_call_table:
+#include <asm/systbl.h>
+
+#undef SYSCALL
+#undef COMPAT_SYS
+#undef PPC_SYS
+#undef OLDSYS
+#undef SYS32ONLY
+#undef PPC64ONLY
+#undef SYSX
+#ifdef CONFIG_COMPAT
+#define SYSCALL(func) .8byte DOTSYM(sys_##func)
+#define COMPAT_SYS(func) .8byte DOTSYM(compat_sys_##func)
+#define PPC_SYS(func) .8byte DOTSYM(ppc_##func)
+#define OLDSYS(func) .8byte DOTSYM(sys_ni_syscall)
+#define SYS32ONLY(func) .8byte DOTSYM(compat_sys_##func)
+#define PPC64ONLY(func) .8byte DOTSYM(sys_ni_syscall)
+#define SYSX(f, f3264, f32) .8byte DOTSYM(f3264)
+
+.globl compat_sys_call_table
+compat_sys_call_table:
#define compat_sys_sigsuspend sys_sigsuspend
#include <asm/systbl.h>
+#endif