mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-16 19:47:55 +00:00
microblaze: move noMMU __range_ok function to uaccess.h
The same noMMU and MMU functions should be placed in one file. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
357bc3c928
commit
60a729f7bb
2 changed files with 6 additions and 9 deletions
|
@ -75,7 +75,12 @@ struct exception_table_entry {
|
||||||
|
|
||||||
#ifndef CONFIG_MMU
|
#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) \
|
#define __range_ok(addr, size) \
|
||||||
___range_ok((unsigned long)(addr), (unsigned long)(size))
|
___range_ok((unsigned long)(addr), (unsigned long)(size))
|
||||||
|
|
|
@ -207,14 +207,6 @@ void __init mem_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_MMU
|
#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)
|
int page_is_ram(unsigned long pfn)
|
||||||
{
|
{
|
||||||
return __range_ok(pfn, 0);
|
return __range_ok(pfn, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue