From: Michal Simek Date: Fri, 5 Mar 2010 14:49:53 +0000 (+0100) Subject: microblaze: move noMMU __range_ok function to uaccess.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60a729f7bb936a9ab82b430de70a1952f560adf3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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 { #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 45b4bce606bb..40bc10ede097 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);