sh: Various nommu fixes.

This fixes up some of the various outstanding nommu bugs on
SH.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Yoshinori Sato
2006-09-27 17:21:02 +09:00
committed by Paul Mundt
parent e7f93a355c
commit e96636ccfa
8 changed files with 50 additions and 23 deletions

View File

@@ -168,6 +168,7 @@ do { \
__gu_err; \
})
#ifdef CONFIG_MMU
#define __get_user_check(x,ptr,size) \
({ \
long __gu_err, __gu_val; \
@@ -257,6 +258,18 @@ __asm__("stc r7_bank, %1\n\t" \
: "r" (addr) \
: "t"); \
})
#else /* CONFIG_MMU */
#define __get_user_check(x,ptr,size) \
({ \
long __gu_err, __gu_val; \
if (__access_ok((unsigned long)(ptr), (size))) { \
__get_user_size(__gu_val, (ptr), (size), __gu_err); \
(x) = (__typeof__(*(ptr)))__gu_val; \
} else \
__gu_err = -EFAULT; \
__gu_err; \
})
#endif
#define __get_user_asm(x, addr, err, insn) \
({ \