Skip to content

Commit

Permalink
sh: Fix up __access_ok() check for nommu.
Browse files Browse the repository at this point in the history
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 <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Apr 18, 2008
1 parent 5c0cbd7 commit 9460c0c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/asm-sh/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 9460c0c

Please sign in to comment.