linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ian Munsie" <imunsie@au1.ibm.com>
To: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Cc: Jason Baron <jbaron@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <michael@ellerman.id.au>,
	Ian Munsie <imunsie@au1.ibm.com>,
	Dave Kleikamp <shaggy@linux.vnet.ibm.com>,
	David Gibson <dwg@au1.ibm.com>,
	Chase Douglas <cndougla@linux.vnet.ibm.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: [PATCH 24/40] trace syscalls, PPC: Convert more ppc32 compat syscalls to COMPAT_SYSCALL
Date: Wed, 23 Jun 2010 20:03:05 +1000	[thread overview]
Message-ID: <1277287401-28571-25-git-send-email-imunsie@au1.ibm.com> (raw)
In-Reply-To: <1277287401-28571-1-git-send-email-imunsie@au1.ibm.com>

From: Ian Munsie <imunsie@au1.ibm.com>

Convert the remaining trivial 32bit compat syscalls to use the
COMPAT_SYSCALL_DEFINE family of macros.

The syscalls addressed by this commit were lacking the asmlinkage flag,
which will be added by the COMPAT_SYSCALL_DEFINE macros. This should not
be an issue as asmlinkage has no effect on PowerPC.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
---
 arch/powerpc/kernel/signal_32.c |   19 +++++++++++++------
 arch/powerpc/kernel/sys_ppc32.c |   20 ++++++++++----------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index 2666101..e65d311 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -595,8 +595,10 @@ static long restore_user_regs(struct pt_regs *regs,
 }
 
 #ifdef CONFIG_PPC64
-long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act,
-		struct sigaction32 __user *oact, size_t sigsetsize)
+COMPAT_SYSCALL_DEFINE4(rt_sigaction, int, sig,
+		const struct sigaction32 __user *, act,
+		struct sigaction32 __user *, oact,
+		size_t, sigsetsize)
 {
 	struct k_sigaction new_ka, old_ka;
 	int ret;
@@ -632,8 +634,10 @@ long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act,
  * of a signed int (msr in 32-bit mode) and the register representation
  * of a signed int (msr in 64-bit mode) is performed.
  */
-long compat_sys_rt_sigprocmask(u32 how, compat_sigset_t __user *set,
-		compat_sigset_t __user *oset, size_t sigsetsize)
+COMPAT_SYSCALL_DEFINE4(rt_sigprocmask, u32, how,
+		compat_sigset_t __user *, set,
+		compat_sigset_t __user *, oset,
+		size_t, sigsetsize)
 {
 	sigset_t s;
 	sigset_t __user *up;
@@ -660,7 +664,9 @@ long compat_sys_rt_sigprocmask(u32 how, compat_sigset_t __user *set,
 	return 0;
 }
 
-long compat_sys_rt_sigpending(compat_sigset_t __user *set, compat_size_t sigsetsize)
+COMPAT_SYSCALL_DEFINE2(rt_sigpending,
+		compat_sigset_t __user *, set,
+		compat_size_t, sigsetsize)
 {
 	sigset_t s;
 	int ret;
@@ -754,7 +760,8 @@ int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from)
  * (msr in 32-bit mode) and the register representation of a signed int
  * (msr in 64-bit mode) is performed.
  */
-long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo)
+COMPAT_SYSCALL_DEFINE3(rt_sigqueueinfo, u32, pid, u32, sig,
+		compat_siginfo_t __user *, uinfo)
 {
 	siginfo_t info;
 	int ret;
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index ab45dde..6fc8ba9 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -73,8 +73,8 @@ COMPAT_SYSCALL_DEFINE3(sysfs, u32, option, u32, arg1,
 }
 
 #ifdef CONFIG_SYSVIPC
-long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
-	       u32 fifth)
+COMPAT_SYSCALL_DEFINE6(ipc, u32, call, u32, first, u32, second, u32, third,
+		compat_uptr_t, ptr, u32, fifth)
 {
 	int version;
 
@@ -340,7 +340,7 @@ COMPAT_SYSCALL_DEFINE2(mkdir, const char __user *, pathname,
 	return sys_mkdir(pathname, (int)mode);
 }
 
-long compat_sys_nice(u32 increment)
+COMPAT_SYSCALL_DEFINE1(nice, u32, increment)
 {
 	/* sign extend increment */
 	return sys_nice((int)increment);
@@ -352,13 +352,13 @@ off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin)
 	return sys_lseek(fd, (int)offset, origin);
 }
 
-long compat_sys_truncate(const char __user * path, u32 length)
+COMPAT_SYSCALL_DEFINE2(truncate, const char __user *, path, u32, length)
 {
 	/* sign extend length */
 	return sys_truncate(path, (int)length);
 }
 
-long compat_sys_ftruncate(int fd, u32 length)
+COMPAT_SYSCALL_DEFINE2(ftruncate, int, fd, u32, length)
 {
 	/* sign extend length */
 	return sys_ftruncate(fd, (int)length);
@@ -486,25 +486,25 @@ COMPAT_SYSCALL_DEFINE2(setpgid, u32, pid, u32, pgid)
 	return sys_setpgid((int)pid, (int)pgid);
 }
 
-long compat_sys_getpriority(u32 which, u32 who)
+COMPAT_SYSCALL_DEFINE2(getpriority, u32, which, u32, who)
 {
 	/* sign extend which and who */
 	return sys_getpriority((int)which, (int)who);
 }
 
-long compat_sys_setpriority(u32 which, u32 who, u32 niceval)
+COMPAT_SYSCALL_DEFINE3(setpriority, u32, which, u32, who, u32, niceval)
 {
 	/* sign extend which, who and niceval */
 	return sys_setpriority((int)which, (int)who, (int)niceval);
 }
 
-long compat_sys_ioprio_get(u32 which, u32 who)
+COMPAT_SYSCALL_DEFINE2(ioprio_get, u32, which, u32, who)
 {
 	/* sign extend which and who */
 	return sys_ioprio_get((int)which, (int)who);
 }
 
-long compat_sys_ioprio_set(u32 which, u32 who, u32 ioprio)
+COMPAT_SYSCALL_DEFINE3(ioprio_set, u32, which, u32, who, u32, ioprio)
 {
 	/* sign extend which, who and ioprio */
 	return sys_ioprio_set((int)which, (int)who, (int)ioprio);
@@ -546,7 +546,7 @@ unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
 	return sys_mmap(addr, len, prot, flags, fd, pgoff << 12);
 }
 
-long compat_sys_tgkill(u32 tgid, u32 pid, int sig)
+COMPAT_SYSCALL_DEFINE3(tgkill, u32, tgid, u32, pid, int, sig)
 {
 	/* sign extend tgid, pid */
 	return sys_tgkill((int)tgid, (int)pid, sig);
-- 
1.7.1


  parent reply	other threads:[~2010-06-23 10:08 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 10:02 ftrace syscalls, PowerPC: Various fixes, Compat Syscall support and PowerPC implementation, V2 Ian Munsie
2010-06-23 10:02 ` [PATCH 01/40] ftrace syscalls: don't add events for unmapped syscalls Ian Munsie
2010-06-23 15:02   ` Steven Rostedt
2010-06-29  1:18     ` Ian Munsie
2010-06-23 10:02 ` [PATCH 02/40] ftrace syscalls: Make arch_syscall_addr weak Ian Munsie
2010-06-23 10:02 ` [PATCH 03/40] ftrace syscalls: Allow arch specific syscall symbol matching Ian Munsie
2010-06-23 10:02 ` [PATCH 04/40] trace, powerpc: Implement raw syscall tracepoints on PowerPC Ian Munsie
2010-06-23 10:02 ` [PATCH 05/40] x86: add NR_syscalls_compat, make ia32 syscall table visible Ian Munsie
2010-06-23 10:02 ` [PATCH 06/40] x86: add arch_compat_syscall_addr() Ian Munsie
2010-06-23 10:02 ` [PATCH 08/40] tracing: remove syscall bitmaps in preparation for compat support Ian Munsie
2010-06-23 15:16   ` Steven Rostedt
2010-06-23 19:14     ` Jason Baron
2010-06-23 19:34       ` Jason Baron
2010-06-23 19:45         ` Steven Rostedt
2010-06-23 10:02 ` [PATCH 09/40] tracing: move __start_ftrace_events and __stop_ftrace_events to header file Ian Munsie
2010-06-23 10:02 ` [PATCH 10/40] tracing: add tracing support for compat syscalls Ian Munsie
2010-06-23 15:26   ` Steven Rostedt
2010-06-23 16:02     ` Frederic Weisbecker
2010-06-23 10:02 ` [PATCH 11/40] syscalls: add ARCH_COMPAT_SYSCALL_DEFINE() Ian Munsie
2010-06-23 10:02 ` [PATCH 12/40] x86, compat: convert ia32 layer to use Ian Munsie
2010-06-23 10:14   ` Christoph Hellwig
2010-06-23 10:36     ` Frederic Weisbecker
2010-06-23 10:46       ` Christoph Hellwig
2010-06-23 11:41         ` Frederic Weisbecker
2010-06-23 19:23           ` H. Peter Anvin
2010-06-24 14:37             ` Christoph Hellwig
2010-06-23 10:02 ` [PATCH 13/40] syscalls: add new COMPAT_SYSCALL_DEFINE#N() macro Ian Munsie
2010-06-23 10:02 ` [PATCH 14/40] compat: convert to use COMPAT_SYSCALL_DEFINE#N() Ian Munsie
2010-06-23 10:02 ` [PATCH 15/40] compat: convert fs compat to use COMPAT_SYSCALL_DEFINE#N() macros Ian Munsie
2010-06-23 10:02 ` [PATCH 16/40] tags: recognize compat syscalls Ian Munsie
2010-06-24 12:02   ` Michal Marek
2010-06-23 10:02 ` [PATCH 17/40] tracing: make a "compat_syscalls" tracing subsys Ian Munsie
2010-06-23 10:02 ` [PATCH 18/40] compat_syscalls: introduce CONFIG_COMPAT_FTRACE_SYSCALLS Ian Munsie
2010-06-23 10:03 ` [PATCH 19/40] trace syscalls: Remove redundant syscall_nr checks Ian Munsie
2010-06-23 10:03 ` [PATCH 20/40] trace syscalls: Considder compat_syscall_nr when verifying syscall_nr Ian Munsie
2010-06-23 10:03 ` [PATCH 21/40] trace syscalls, PPC: Add ftrace compat syscall support for PPC64 Ian Munsie
2010-06-23 10:03 ` [PATCH 22/40] trace syscalls, PPC: Convert syscalls to SYSCALL_DEFINE Ian Munsie
2010-06-23 10:03 ` [PATCH 23/40] trace syscalls, PPC: Convert ppc32 compat syscalls to COMPAT_SYSCALL Ian Munsie
2010-06-23 10:03 ` Ian Munsie [this message]
2010-06-23 10:03 ` [PATCH 25/40] trace syscalls: Refactor syscall metadata creation Ian Munsie
2010-06-23 10:03 ` [PATCH 26/40] trace syscalls, PPC: Add PPC_REGS_SYSCALL_DEFINE macros Ian Munsie
2010-06-23 10:03 ` [PATCH 27/40] trace syscalls: Add COMPAT_SYSCALL_DEFINE0 macro Ian Munsie
2010-06-23 10:03 ` [PATCH 28/40] trace syscalls, PPC: Convert syscalls using regs to REGS_SYSCALL_DEFINE macros Ian Munsie
2010-06-23 10:03 ` [PATCH 29/40] trace syscalls, PPC: Convert ppc32_ syscalls to ARCH_COMPAT_SYSCALL_DEFINE Ian Munsie
2010-06-23 10:03 ` [PATCH 30/40] trace syscalls: Convert remaining kernel/compat.c syscalls to COMPAT_SYSCALL_DEFINE Ian Munsie
2010-06-23 10:03 ` [PATCH 33/40] trace syscalls: Infrastructure for syscalls different return types Ian Munsie
2010-06-23 10:03 ` [PATCH 34/40] trace syscalls: Convert generic syscalls without long return type Ian Munsie
2010-06-23 10:03 ` [PATCH 35/40] trace syscalls, PPC: Convert PPC syscalls without long return types Ian Munsie
2010-06-23 10:03 ` [PATCH 36/40] trace syscalls: Early terminate search for sys_ni_syscall Ian Munsie
2010-06-23 10:03 ` [PATCH 37/40] trace syscalls: Print out unmapped syscalls at boot Ian Munsie
2010-06-23 10:03 ` [PATCH 38/40] trace syscalls: Remove redundant test for unmapped compat syscalls Ian Munsie
2010-06-23 10:03 ` [PATCH 39/40] trace syscalls: Clean confusing {s,r,}name and fix ABI breakage Ian Munsie
2010-06-23 18:03   ` Jason Baron
2010-06-29  1:02     ` Ian Munsie
2010-06-23 10:03 ` [PATCH 40/40] trace syscalls, PPC: Convert morphing native/compat syscalls Ian Munsie
     [not found] ` <1277287401-28571-32-git-send-email-imunsie@au1.ibm.com>
     [not found]   ` <4C21DFBA.2070202@linux.intel.com>
     [not found]     ` <20100623102931.GB5242@nowhere>
     [not found]       ` <4C21E3F8.9000405@linux.intel.com>
2010-06-24 12:05         ` [PATCH 31/40] trace syscalls: Convert various generic compat syscalls Michal Marek

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=1277287401-28571-25-git-send-email-imunsie@au1.ibm.com \
    --to=imunsie@au1.ibm.com \
    --cc=adobriyan@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=cndougla@linux.vnet.ibm.com \
    --cc=dwg@au1.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=michael@ellerman.id.au \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=rostedt@goodmis.org \
    --cc=shaggy@linux.vnet.ibm.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).