summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-02-04 03:16:33 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-04 03:16:33 +0400
commitc6489c147de592af4d0d1c5263e7b4f0e8e7d100 (patch)
tree974f74d5b3c2af8aebddf8b01c2687395107dc7d /arch/mips
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
parent12890d0f61fc4ed4c3afbb1982df382aa9905834 (diff)
downloadlinux-c6489c147de592af4d0d1c5263e7b4f0e8e7d100.tar.xz
Merge commit '12890d0f61fc' into arch-mips
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/syscall.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 201cb76b4df9..107307d583eb 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -138,10 +138,10 @@ SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
return 0;
}
-static inline int mips_atomic_set(struct pt_regs *regs,
- unsigned long addr, unsigned long new)
+static inline int mips_atomic_set(unsigned long addr, unsigned long new)
{
unsigned long old, tmp;
+ struct pt_regs *regs;
unsigned int err;
if (unlikely(addr & 3))
@@ -222,6 +222,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
if (unlikely(err))
return err;
+ regs = current_pt_regs();
regs->regs[2] = old;
regs->regs[7] = 0; /* No error */
@@ -235,22 +236,14 @@ static inline int mips_atomic_set(struct pt_regs *regs,
: "r" (regs));
/* unreached. Honestly. */
- while (1);
+ unreachable();
}
-save_static_function(sys_sysmips);
-static int __used noinline
-_sys_sysmips(nabi_no_regargs struct pt_regs regs)
+SYSCALL_DEFINE3(sysmips, long, cmd, long, arg1, long, arg2)
{
- long cmd, arg1, arg2;
-
- cmd = regs.regs[4];
- arg1 = regs.regs[5];
- arg2 = regs.regs[6];
-
switch (cmd) {
case MIPS_ATOMIC_SET:
- return mips_atomic_set(&regs, arg1, arg2);
+ return mips_atomic_set(arg1, arg2);
case MIPS_FIXADE:
if (arg1 & ~3)