summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-12-27 16:23:12 +0100
committerRalf Baechle <ralf@linux-mips.org>2013-02-01 10:00:20 +0100
commitbc4f2975546a25cd60d32d5a847c5bc94be1cf50 (patch)
treea0cda679d61305fc1c6b1224ed0ed84260c1ccf9
parent33722a2e73ad379ee4898f273217ca0eacf8a87f (diff)
downloadop-kernel-dev-bc4f2975546a25cd60d32d5a847c5bc94be1cf50.zip
op-kernel-dev-bc4f2975546a25cd60d32d5a847c5bc94be1cf50.tar.gz
MIPS: sysmips: Rewrite to use SYSCALL_DEFINE3().
Thanks to current_pt_regs() there is no need to use the dark MIPS magic. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/syscall.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 8c81f7d..107307d 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 */
@@ -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(&regs, arg1, arg2);
+ return mips_atomic_set(arg1, arg2);
case MIPS_FIXADE:
if (arg1 & ~3)
OpenPOWER on IntegriCloud