diff options
| -rw-r--r-- | arch/mips/kernel/syscall.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 8c81f7d11df6..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) | |||
| 138 | return 0; | 138 | return 0; |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static inline int mips_atomic_set(struct pt_regs *regs, | 141 | static inline int mips_atomic_set(unsigned long addr, unsigned long new) |
| 142 | unsigned long addr, unsigned long new) | ||
| 143 | { | 142 | { |
| 144 | unsigned long old, tmp; | 143 | unsigned long old, tmp; |
| 144 | struct pt_regs *regs; | ||
| 145 | unsigned int err; | 145 | unsigned int err; |
| 146 | 146 | ||
| 147 | if (unlikely(addr & 3)) | 147 | if (unlikely(addr & 3)) |
| @@ -222,6 +222,7 @@ static inline int mips_atomic_set(struct pt_regs *regs, | |||
| 222 | if (unlikely(err)) | 222 | if (unlikely(err)) |
| 223 | return err; | 223 | return err; |
| 224 | 224 | ||
| 225 | regs = current_pt_regs(); | ||
| 225 | regs->regs[2] = old; | 226 | regs->regs[2] = old; |
| 226 | regs->regs[7] = 0; /* No error */ | 227 | regs->regs[7] = 0; /* No error */ |
| 227 | 228 | ||
| @@ -238,19 +239,11 @@ static inline int mips_atomic_set(struct pt_regs *regs, | |||
| 238 | unreachable(); | 239 | unreachable(); |
| 239 | } | 240 | } |
| 240 | 241 | ||
| 241 | save_static_function(sys_sysmips); | 242 | SYSCALL_DEFINE3(sysmips, long, cmd, long, arg1, long, arg2) |
| 242 | static int __used noinline | ||
| 243 | _sys_sysmips(nabi_no_regargs struct pt_regs regs) | ||
| 244 | { | 243 | { |
| 245 | long cmd, arg1, arg2; | ||
| 246 | |||
| 247 | cmd = regs.regs[4]; | ||
| 248 | arg1 = regs.regs[5]; | ||
| 249 | arg2 = regs.regs[6]; | ||
| 250 | |||
| 251 | switch (cmd) { | 244 | switch (cmd) { |
| 252 | case MIPS_ATOMIC_SET: | 245 | case MIPS_ATOMIC_SET: |
| 253 | return mips_atomic_set(®s, arg1, arg2); | 246 | return mips_atomic_set(arg1, arg2); |
| 254 | 247 | ||
| 255 | case MIPS_FIXADE: | 248 | case MIPS_FIXADE: |
| 256 | if (arg1 & ~3) | 249 | if (arg1 & ~3) |
