From: Rohan McLure <rmclure@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Rohan McLure <rmclure@linux.ibm.com>, npiggin@gmail.com
Subject: [PATCH 5/6] powerpc: Move syscall handler prototypes to header
Date: Wed, 1 Jun 2022 15:48:49 +1000 [thread overview]
Message-ID: <20220601054850.250287-5-rmclure@linux.ibm.com> (raw)
In-Reply-To: <20220601054850.250287-1-rmclure@linux.ibm.com>
Since some power syscall handlers call into other syscall handlers with
the usual in-register calling convention, emit symbols for both
conventions when required. The prototypes for handlers supporting
in-register parameters should exist in a header rather than immediately
preceding their usage.
Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
arch/powerpc/include/asm/syscalls.h | 16 ++++++++++++++++
arch/powerpc/kernel/syscalls.c | 7 -------
arch/powerpc/kernel/vdso.c | 3 +--
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h
index 75d8e1822caf..1e5f2ddcabe0 100644
--- a/arch/powerpc/include/asm/syscalls.h
+++ b/arch/powerpc/include/asm/syscalls.h
@@ -43,6 +43,22 @@
struct rtas_args;
+#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
+#include <linux/syscalls.h>
+asmlinkage long sys_ni_syscall(void);
+#ifdef CONFIG_PPC32
+asmlinkage long sys_old_select(struct sel_arg_struct __user *arg);
+asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
+ fd_set __user *exp,
+ struct __kernel_old_timeval __user *tvp);
+#endif /* CONFIG_PPC32 */
+
+#ifdef CONFIG_PPC64
+asmlinkage long sys_personality(unsigned int personality);
+#endif /* CONFIG_PPC64 */
+
+#endif /* CONFIG_ARCH_HAS_SYSCALL_WRAPPER */
+
asmlinkage long sys_mmap(unsigned long addr, size_t len,
unsigned long prot, unsigned long flags,
unsigned long fd, off_t offset);
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index c64cdb5c4435..6107bdd5dad1 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -64,11 +64,6 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len,
}
#ifdef CONFIG_PPC32
-asmlinkage long sys_old_select(struct sel_arg_struct __user *arg);
-asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
- fd_set __user *exp,
- struct __kernel_old_timeval __user *tvp);
-
/*
* Due to some executables calling the wrong select we sometimes
* get wrong args. This determines how the args are being passed
@@ -87,8 +82,6 @@ PPC_SYSCALL_DEFINE(5, long, ppc_select,
#endif
#ifdef CONFIG_PPC64
-asmlinkage long sys_personality(unsigned int personality);
-
PPC_SYSCALL_DEFINE(1, long, ppc64_personality, unsigned long, personality)
{
long ret;
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index dcf57c07dbad..8a56e290fcaf 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -22,6 +22,7 @@
#include <vdso/datapage.h>
#include <asm/syscall.h>
+#include <asm/syscalls.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/mmu_context.h>
@@ -40,8 +41,6 @@
extern char vdso32_start, vdso32_end;
extern char vdso64_start, vdso64_end;
-asmlinkage long sys_ni_syscall(void);
-
/*
* The vdso data page (aka. systemcfg for old ppc64 fans) is here.
* Once the early boot kernel code no longer needs to muck around
--
2.34.1
next prev parent reply other threads:[~2022-06-01 5:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 5:48 [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears Rohan McLure
2022-06-01 5:48 ` [PATCH 2/6] powerpc: Provide syscall wrapper Rohan McLure
2022-06-01 8:29 ` Christophe Leroy
2022-06-09 13:06 ` Christophe Leroy
2022-06-16 5:42 ` Rohan McLure
2022-06-16 7:20 ` Arnd Bergmann
2022-06-01 8:59 ` kernel test robot
2022-06-01 9:35 ` kernel test robot
2022-06-01 12:23 ` kernel test robot
2022-06-01 14:33 ` Christophe Leroy
2022-06-03 3:24 ` Rohan McLure
2022-06-03 7:09 ` Andrew Donnellan
2022-06-03 8:39 ` Christophe Leroy
2022-06-14 13:57 ` Andrew Donnellan
2022-06-03 9:04 ` Arnd Bergmann
2022-06-15 1:47 ` Rohan McLure
2022-06-15 10:13 ` Arnd Bergmann
2022-06-01 5:48 ` [PATCH 3/6] powerpc: Make syscalls save and restore gprs Rohan McLure
2022-06-01 8:33 ` Christophe Leroy
2022-06-01 5:48 ` [PATCH 4/6] powerpc: Fix comment, use clear and restore macros Rohan McLure
2022-06-01 5:48 ` Rohan McLure [this message]
2022-06-01 5:48 ` [PATCH 6/6] powerpc/64s: Clear gprs on interrupt routine entry Rohan McLure
2022-06-01 8:37 ` Christophe Leroy
2022-06-01 7:45 ` [PATCH 1/6] powerpc: Add ZERO_GPRS macros for register clears Christophe Leroy
2022-06-01 16:00 ` Segher Boessenkool
2022-06-10 3:32 ` Rohan McLure
2022-06-10 14:05 ` Segher Boessenkool
2022-06-11 8:42 ` Christophe Leroy
2022-06-13 18:48 ` Segher Boessenkool
2022-06-14 4:31 ` Michael Ellerman
2022-06-14 11:43 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220601054850.250287-5-rmclure@linux.ibm.com \
--to=rmclure@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).