From 60a729f7bb936a9ab82b430de70a1952f560adf3 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 5 Mar 2010 15:49:53 +0100 Subject: 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 --- arch/microblaze/include/asm/uaccess.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'arch/microblaze/include/asm/uaccess.h') 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)) -- cgit v1.1