From a11af6a9ee0e1bc6a259c8e716912c69dbae8116 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 27 Dec 2012 16:23:12 +0100 Subject: [PATCH] --- yaml --- r: 356699 b: refs/heads/master c: 12890d0f61fc4ed4c3afbb1982df382aa9905834 h: refs/heads/master i: 356697: 046c600762600aa607d5400dbf8601976ef34542 356695: 50ac3ae1ee9ba8887269281bddeb27a60c6a81ab v: v3 --- [refs] | 2 +- trunk/arch/mips/kernel/syscall.c | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index a3bcc46f1b36..53eef6e80511 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f2ace93136cade6904a71d26e2f4768eef3b9aa3 +refs/heads/master: 12890d0f61fc4ed4c3afbb1982df382aa9905834 diff --git a/trunk/arch/mips/kernel/syscall.c b/trunk/arch/mips/kernel/syscall.c index 8c81f7d11df6..107307d583eb 100644 --- a/trunk/arch/mips/kernel/syscall.c +++ b/trunk/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 */ @@ -238,19 +239,11 @@ static inline int mips_atomic_set(struct pt_regs *regs, 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(®s, arg1, arg2); + return mips_atomic_set(arg1, arg2); case MIPS_FIXADE: if (arg1 & ~3)