microblaze: move noMMU __range_ok function to uaccess.h
authorMichal Simek <monstr@monstr.eu>
Fri, 5 Mar 2010 14:49:53 +0000 (15:49 +0100)
committerMichal Simek <monstr@monstr.eu>
Thu, 1 Apr 2010 06:38:20 +0000 (08:38 +0200)
The same noMMU and MMU functions should be placed in
one file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/include/asm/uaccess.h
arch/microblaze/mm/init.c

index e2adad3..ce5defb 100644 (file)
@@ -75,7 +75,12 @@ struct exception_table_entry {
 
 #ifndef CONFIG_MMU
 
-extern int ___range_ok(unsigned long addr, unsigned long size);
+/* Check against bounds of physical memory */
+static inline int ___range_ok(unsigned long addr, unsigned long size)
+{
+       return ((addr < memory_start) ||
+               ((addr + size) > memory_end));
+}
 
 #define __range_ok(addr, size) \
                ___range_ok((unsigned long)(addr), (unsigned long)(size))
index 45b4bce..40bc10e 100644 (file)
@@ -207,14 +207,6 @@ void __init mem_init(void)
 }
 
 #ifndef CONFIG_MMU
-/* Check against bounds of physical memory */
-int ___range_ok(unsigned long addr, unsigned long size)
-{
-       return ((addr < memory_start) ||
-               ((addr + size) > memory_end));
-}
-EXPORT_SYMBOL(___range_ok);
-
 int page_is_ram(unsigned long pfn)
 {
        return __range_ok(pfn, 0);