microblaze: move noMMU __range_ok function to uaccess.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, April 1, 2010 - 10:59 am

Gitweb:     http://git.kernel.org/linus/60a729f7bb936a9ab82b430de70a1952f560adf3
Commit:     60a729f7bb936a9ab82b430de70a1952f560adf3
Parent:     357bc3c9284b2fb201786176e8187d2273323bc1
Author:     Michal Simek <monstr@monstr.eu>
AuthorDate: Fri Mar 5 15:49:53 2010 +0100
Committer:  Michal Simek <monstr@monstr.eu>
CommitDate: Thu Apr 1 08:38:20 2010 +0200

    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>
---
 arch/microblaze/include/asm/uaccess.h |    7 ++++++-
 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 e2adad3..ce5defb 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -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))
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 45b4bce..40bc10e 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
microblaze: move noMMU __range_ok function to uaccess.h, Linux Kernel Mailing ..., (Thu Apr 1, 10:59 am)