diff options
author | Michal Simek <monstr@monstr.eu> | 2010-03-05 09:49:53 -0500 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-04-01 02:38:20 -0400 |
commit | 60a729f7bb936a9ab82b430de70a1952f560adf3 (patch) | |
tree | 408ce1e0d1ecce6cc5615e2bea3c94b8904de4e5 /arch/microblaze/include/asm/uaccess.h | |
parent | 357bc3c9284b2fb201786176e8187d2273323bc1 (diff) |
microblaze: move noMMU __range_ok function to uaccess.h
The same noMMU and MMU functions should be placed in
one file.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/include/asm/uaccess.h')
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index e2adad33950e..ce5defb259a4 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -75,7 +75,12 @@ struct exception_table_entry { | |||
75 | 75 | ||
76 | #ifndef CONFIG_MMU | 76 | #ifndef CONFIG_MMU |
77 | 77 | ||
78 | extern int ___range_ok(unsigned long addr, unsigned long size); | 78 | /* Check against bounds of physical memory */ |
79 | static inline int ___range_ok(unsigned long addr, unsigned long size) | ||
80 | { | ||
81 | return ((addr < memory_start) || | ||
82 | ((addr + size) > memory_end)); | ||
83 | } | ||
79 | 84 | ||
80 | #define __range_ok(addr, size) \ | 85 | #define __range_ok(addr, size) \ |
81 | ___range_ok((unsigned long)(addr), (unsigned long)(size)) | 86 | ___range_ok((unsigned long)(addr), (unsigned long)(size)) |