diff options
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 7 | ||||
-rw-r--r-- | arch/microblaze/mm/init.c | 8 |
2 files changed, 6 insertions, 9 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)) |
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 45b4bce606bb..40bc10ede097 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -207,14 +207,6 @@ void __init mem_init(void) | |||
207 | } | 207 | } |
208 | 208 | ||
209 | #ifndef CONFIG_MMU | 209 | #ifndef CONFIG_MMU |
210 | /* Check against bounds of physical memory */ | ||
211 | int ___range_ok(unsigned long addr, unsigned long size) | ||
212 | { | ||
213 | return ((addr < memory_start) || | ||
214 | ((addr + size) > memory_end)); | ||
215 | } | ||
216 | EXPORT_SYMBOL(___range_ok); | ||
217 | |||
218 | int page_is_ram(unsigned long pfn) | 210 | int page_is_ram(unsigned long pfn) |
219 | { | 211 | { |
220 | return __range_ok(pfn, 0); | 212 | return __range_ok(pfn, 0); |