summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/uaccess.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
commit545f435ebcfd94a1e7c20b46efe81b4d6ac4e698 (patch)
treee9ce4bc598d06374bda906f18365984bf22a526a /include/asm-sparc64/uaccess.h
parent4291a610eef89d0d5c69d9a10ee6560e1aa36c74 (diff)
Merge with Linux 2.1.55. More bugfixes and goodies from my private
CVS archive.
Diffstat (limited to 'include/asm-sparc64/uaccess.h')
-rw-r--r--include/asm-sparc64/uaccess.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
index c0668e3f2..1d06cce7d 100644
--- a/include/asm-sparc64/uaccess.h
+++ b/include/asm-sparc64/uaccess.h
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.20 1997/07/13 18:23:45 davem Exp $ */
+/* $Id: uaccess.h,v 1.22 1997/08/19 15:25:35 jj Exp $ */
#ifndef _ASM_UACCESS_H
#define _ASM_UACCESS_H
@@ -30,8 +30,11 @@
#define get_fs() (current->tss.current_ds)
#define get_ds() (KERNEL_DS)
+
+extern spinlock_t scheduler_lock;
+
#define set_fs(val) \
-do { \
+do { spin_lock(&scheduler_lock); \
current->tss.current_ds = (val); \
if ((val) == KERNEL_DS) { \
flushw_user (); \
@@ -41,6 +44,7 @@ do { \
} \
spitfire_set_secondary_context(current->tss.ctx); \
__asm__ __volatile__("flush %g6"); \
+ spin_unlock(&scheduler_lock); \
} while(0)
#define __user_ok(addr,size) 1
@@ -77,7 +81,7 @@ extern inline int verify_area(int type, const void * addr, unsigned long size)
struct exception_table_entry
{
- unsigned long insn, fixup;
+ unsigned insn, fixup;
};
/* Returns 0 if exception not found and fixup otherwise. */
@@ -151,8 +155,8 @@ __asm__ __volatile__( \
" mov %3, %0\n\n\t" \
".previous\n\t" \
".section __ex_table,#alloc\n\t" \
- ".align 8\n\t" \
- ".xword 1b, 3b\n\t" \
+ ".align 4\n\t" \
+ ".word 1b, 3b\n\t" \
".previous\n\n\t" \
: "=r" (ret) : "r" (x), "r" (__m(addr)), \
"i" (-EFAULT), "i" (ASI_S))
@@ -163,8 +167,8 @@ __asm__ __volatile__( \
"/* Put user asm ret, inline. */\n" \
"1:\t" "st"#size "a %1, [%2] %3\n\n\t" \
".section __ex_table,#alloc\n\t" \
- ".align 8\n\t" \
- ".xword 1b, __ret_efault\n\n\t" \
+ ".align 4\n\t" \
+ ".word 1b, __ret_efault\n\n\t" \
".previous\n\n\t" \
: "=r" (foo) : "r" (x), "r" (__m(addr)), "i" (ASI_S)); \
else \
@@ -178,8 +182,8 @@ __asm__ __volatile( \
" restore %%g0, %3, %%o0\n\n\t" \
".previous\n\t" \
".section __ex_table,#alloc\n\t" \
- ".align 8\n\t" \
- ".xword 1b, 3b\n\n\t" \
+ ".align 4\n\t" \
+ ".word 1b, 3b\n\n\t" \
".previous\n\n\t" \
: "=r" (foo) : "r" (x), "r" (__m(addr)), \
"i" (ret), "i" (ASI_S))
@@ -221,8 +225,8 @@ __asm__ __volatile__( \
" mov %3, %0\n\n\t" \
".previous\n\t" \
".section __ex_table,#alloc\n\t" \
- ".align 8\n\t" \
- ".xword 1b, 3b\n\n\t" \
+ ".align 4\n\t" \
+ ".word 1b, 3b\n\n\t" \
".previous\n\t" \
: "=r" (ret), "=r" (x) : "r" (__m(addr)), \
"i" (-EFAULT), "i" (ASI_S))
@@ -233,8 +237,8 @@ __asm__ __volatile__( \
"/* Get user asm ret, inline. */\n" \
"1:\t" "ld"#size "a [%1] %2, %0\n\n\t" \
".section __ex_table,#alloc\n\t" \
- ".align 8\n\t" \
- ".xword 1b,__ret_efault\n\n\t" \
+ ".align 4\n\t" \
+ ".word 1b,__ret_efault\n\n\t" \
".previous\n\t" \
: "=r" (x) : "r" (__m(addr)), "i" (ASI_S)); \
else \
@@ -248,8 +252,8 @@ __asm__ __volatile__( \
" restore %%g0, %3, %%o0\n\n\t" \
".previous\n\t" \
".section __ex_table,#alloc\n\t" \
- ".align 8\n\t" \
- ".xword 1b, 3b\n\n\t" \
+ ".align 4\n\t" \
+ ".word 1b, 3b\n\n\t" \
".previous\n\t" \
: "=r" (x) : "r" (__m(addr)), "i" (retval), "i" (ASI_S))