summaryrefslogtreecommitdiff
path: root/arch/microblaze/include/asm/uaccess.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/include/asm/uaccess.h')
-rw-r--r--arch/microblaze/include/asm/uaccess.h7
1 files changed, 6 insertions, 1 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))