aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/include')
-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 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 {
75 75
76#ifndef CONFIG_MMU 76#ifndef CONFIG_MMU
77 77
78extern int ___range_ok(unsigned long addr, unsigned long size); 78/* Check against bounds of physical memory */
79static inline int ___range_ok(unsigned long addr, unsigned long size)
80{
81 return ((addr < memory_start) ||
82 ((addr + size) > memory_end));
83}
79 84
80#define __range_ok(addr, size) \ 85#define __range_ok(addr, size) \
81 ___range_ok((unsigned long)(addr), (unsigned long)(size)) 86 ___range_ok((unsigned long)(addr), (unsigned long)(size))