aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-03-10 18:21:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:32 -0500
commite28cbf22933d0c0ccaf3c4c27a1a263b41f73859 (patch)
treea93ff48cfd97766a23b2c4f3ea86fccfc9c51d3f /arch/powerpc/include/asm
parentbaed7fc9b580bd3fb8252ff1d9b36eaf1f86b670 (diff)
improve sys_newuname() for compat architectures
On an architecture that supports 32-bit compat we need to override the reported machine in uname with the 32-bit value. Instead of doing this separately in every architecture introduce a COMPAT_UTS_MACHINE define in <asm/compat.h> and apply it directly in sys_newuname(). Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: James Morris <jmorris@namei.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/compat.h3
-rw-r--r--arch/powerpc/include/asm/syscalls.h2
-rw-r--r--arch/powerpc/include/asm/systbl.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h
index 4774c2f92232..396d21a80058 100644
--- a/arch/powerpc/include/asm/compat.h
+++ b/arch/powerpc/include/asm/compat.h
@@ -7,7 +7,8 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/sched.h> 8#include <linux/sched.h>
9 9
10#define COMPAT_USER_HZ 100 10#define COMPAT_USER_HZ 100
11#define COMPAT_UTS_MACHINE "ppc\0\0"
11 12
12typedef u32 compat_size_t; 13typedef u32 compat_size_t;
13typedef s32 compat_ssize_t; 14typedef s32 compat_ssize_t;
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h
index 23bb74e7f946..4084e567d28e 100644
--- a/arch/powerpc/include/asm/syscalls.h
+++ b/arch/powerpc/include/asm/syscalls.h
@@ -7,7 +7,6 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <asm/signal.h> 8#include <asm/signal.h>
9 9
10struct new_utsname;
11struct pt_regs; 10struct pt_regs;
12struct rtas_args; 11struct rtas_args;
13struct sigaction; 12struct sigaction;
@@ -38,7 +37,6 @@ asmlinkage long sys_rt_sigaction(int sig,
38asmlinkage long ppc64_personality(unsigned long personality); 37asmlinkage long ppc64_personality(unsigned long personality);
39asmlinkage int ppc_rtas(struct rtas_args __user *uargs); 38asmlinkage int ppc_rtas(struct rtas_args __user *uargs);
40asmlinkage time_t sys64_time(time_t __user * tloc); 39asmlinkage time_t sys64_time(time_t __user * tloc);
41asmlinkage long ppc_newuname(struct new_utsname __user * name);
42 40
43asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, 41asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset,
44 size_t sigsetsize); 42 size_t sigsetsize);
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 07d2d19ab5e9..a5ee345b6a5c 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -125,7 +125,7 @@ SYSCALL_SPU(fsync)
125SYS32ONLY(sigreturn) 125SYS32ONLY(sigreturn)
126PPC_SYS(clone) 126PPC_SYS(clone)
127COMPAT_SYS_SPU(setdomainname) 127COMPAT_SYS_SPU(setdomainname)
128PPC_SYS_SPU(newuname) 128SYSCALL_SPU(newuname)
129SYSCALL(ni_syscall) 129SYSCALL(ni_syscall)
130COMPAT_SYS_SPU(adjtimex) 130COMPAT_SYS_SPU(adjtimex)
131SYSCALL_SPU(mprotect) 131SYSCALL_SPU(mprotect)