summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-11-18 01:19:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-11-18 01:19:35 +0000
commitdae618285814f5d89a43cf3d3e7dcd8f3f7bfbc7 (patch)
tree6b5bd2e8a974a9eba6b0051bb7e79270af95b233 /arch/mips
parent0c6e7b6bd8049d916a117966afc2758795739055 (diff)
Hopefully R3k-proof version of sysmips(MIPS_ATOMIC_SET, ...).
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/sysmips.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/mips/kernel/sysmips.c b/arch/mips/kernel/sysmips.c
index baf2f81df..2ceb8fe4f 100644
--- a/arch/mips/kernel/sysmips.c
+++ b/arch/mips/kernel/sysmips.c
@@ -7,6 +7,7 @@
*
* Copyright (C) 1995, 1996, 1997, 2000 by Ralf Baechle
*/
+#include <linux/config.h>
#include <linux/errno.h>
#include <linux/linkage.h>
#include <linux/mm.h>
@@ -21,6 +22,8 @@
#include <asm/sysmips.h>
#include <asm/uaccess.h>
+extern asmlinkage void syscall_trace(void);
+
/*
* How long a hostname can we get from user space?
* -EFAULT if invalid area or too long
@@ -81,21 +84,19 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3)
errno = 0;
__asm__(".set\tpush\t\t\t# sysmips(MIPS_ATOMIC, ...)\n\t"
- ".set\tnoreorder\n\t"
+ ".set\tmips2\n\t"
".set\tnoat\n\t"
"1:\tll\t%0, %4\n\t"
- "2:\tmove\t$1, %3\n\t"
- "3:\tsc\t$1, %1\n\t"
- "beqzl\t$1, 2b\n\t"
- "4:\t ll\t%0, %4\n\t"
+ "move\t$1, %3\n\t"
+ "2:\tsc\t$1, %1\n\t"
+ "beqz\t$1, 1b\n\t"
".set\tpop\n\t"
".section\t.fixup,\"ax\"\n"
- "5:\tli\t%2, 1\t\t\t# error\n\t"
+ "3:\tli\t%2, 1\t\t\t# error\n\t"
".previous\n\t"
".section\t__ex_table,\"a\"\n\t"
- ".dword\t1b, 5b\n\t"
- ".dword\t3b, 5b\n\t"
- ".dword\t4b, 5b\n\t"
+ ".word\t1b, 3b\n\t"
+ ".word\t2b, 3b\n\t"
".previous\n\t"
: "=&r" (tmp), "=o" (* (u32 *) p), "=r" (errno)
: "r" (arg2), "o" (* (u32 *) p), "2" (errno)