diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2006-09-27 17:25:07 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 17:25:07 +0900 |
commit | a2d1a5fae6296c2a3ac1aaa982c95464c46c0585 (patch) | |
tree | fa704906d368f6ab0f03b164d5071992a4029a9a /include/asm-sh/uaccess.h | |
parent | 0b8929354cdeddb17e81bfda903812c9adfd0b67 (diff) |
sh: __addr_ok() and other misc nommu fixups.
A few more outstanding nommu fixups..
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/uaccess.h')
-rw-r--r-- | include/asm-sh/uaccess.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h index 5c3b00c2f10..5c49ed6715f 100644 --- a/include/asm-sh/uaccess.h +++ b/include/asm-sh/uaccess.h @@ -34,12 +34,12 @@ #define segment_eq(a,b) ((a).seg == (b).seg) -#define __addr_ok(addr) \ - ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg)) - #define get_ds() (KERNEL_DS) #if !defined(CONFIG_MMU) +/* NOMMU is always true */ +#define __addr_ok(addr) (1) + static inline mm_segment_t get_fs(void) { return USER_DS; @@ -66,6 +66,9 @@ static inline int __access_ok(unsigned long addr, unsigned long size) return ((addr >= memory_start) && ((addr + size) < memory_end)); } #else /* CONFIG_MMU */ +#define __addr_ok(addr) \ + ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg)) + #define get_fs() (current_thread_info()->addr_limit) #define set_fs(x) (current_thread_info()->addr_limit = (x)) |