Skip to content

Commit

Permalink
microblaze: move noMMU __range_ok function to uaccess.h
Browse files Browse the repository at this point in the history
The same noMMU and MMU functions should be placed in
one file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Apr 1, 2010
1 parent 357bc3c commit 60a729f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 6 additions & 1 deletion arch/microblaze/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 0 additions & 8 deletions arch/microblaze/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ void __init mem_init(void)
}

#ifndef CONFIG_MMU
/* Check against bounds of physical memory */
int ___range_ok(unsigned long addr, unsigned long size)
{
return ((addr < memory_start) ||
((addr + size) > memory_end));
}
EXPORT_SYMBOL(___range_ok);

int page_is_ram(unsigned long pfn)
{
return __range_ok(pfn, 0);
Expand Down

0 comments on commit 60a729f

Please sign in to comment.