diff options
Diffstat (limited to 'arch/xtensa/include')
-rw-r--r-- | arch/xtensa/include/asm/page.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h index 11f7dc2dbec7..a5a5d33c15d0 100644 --- a/arch/xtensa/include/asm/page.h +++ b/arch/xtensa/include/asm/page.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/types.h> | 15 | #include <asm/types.h> |
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | #include <platform/hardware.h> | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * Fixed TLB translations in the processor. | 20 | * Fixed TLB translations in the processor. |
@@ -150,9 +151,11 @@ extern void copy_user_page(void*, void*, unsigned long, struct page*); | |||
150 | * addresses. | 151 | * addresses. |
151 | */ | 152 | */ |
152 | 153 | ||
154 | #define ARCH_PFN_OFFSET (PLATFORM_DEFAULT_MEM_START >> PAGE_SHIFT) | ||
155 | |||
153 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) | 156 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) |
154 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) | 157 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) |
155 | #define pfn_valid(pfn) ((unsigned long)pfn < max_mapnr) | 158 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr) |
156 | #ifdef CONFIG_DISCONTIGMEM | 159 | #ifdef CONFIG_DISCONTIGMEM |
157 | # error CONFIG_DISCONTIGMEM not supported | 160 | # error CONFIG_DISCONTIGMEM not supported |
158 | #endif | 161 | #endif |