From: Paul Mundt Date: Fri, 21 Mar 2008 09:08:58 +0000 (+0900) Subject: sh: Fix up __access_ok() check for nommu. X-Git-Tag: v2.6.26-rc1~1135^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9460c0ce9b29825d279081d5078815a32c268ada;p=linux-2.6 sh: Fix up __access_ok() check for nommu. Presently this only checks to see if an address is an RAM, but this doesn't work with XIP, so just always return 1. Follows m68knommu. Signed-off-by: Paul Mundt --- diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h index c0318b6088..1e41fda74b 100644 --- a/include/asm-sh/uaccess_32.h +++ b/include/asm-sh/uaccess_32.h @@ -55,13 +55,10 @@ static inline void set_fs(mm_segment_t s) * If we don't have an MMU (or if its disabled) the only thing we really have * to look out for is if the address resides somewhere outside of what * available RAM we have. - * - * TODO: This check could probably also stand to be restricted somewhat more.. - * though it still does the Right Thing(tm) for the time being. */ static inline int __access_ok(unsigned long addr, unsigned long size) { - return ((addr >= memory_start) && ((addr + size) < memory_end)); + return 1; } #else /* CONFIG_MMU */ #define __addr_ok(addr) \