diff options
Diffstat (limited to 'include/asm-i386/page.h')
-rw-r--r-- | include/asm-i386/page.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 41400d342d44..8d93f732d72d 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -120,13 +120,18 @@ static __inline__ int get_order(unsigned long size) | |||
120 | 120 | ||
121 | extern int sysctl_legacy_va_layout; | 121 | extern int sysctl_legacy_va_layout; |
122 | 122 | ||
123 | extern int page_is_ram(unsigned long pagenr); | ||
124 | |||
123 | #endif /* __ASSEMBLY__ */ | 125 | #endif /* __ASSEMBLY__ */ |
124 | 126 | ||
125 | #ifdef __ASSEMBLY__ | 127 | #ifdef __ASSEMBLY__ |
126 | #define __PAGE_OFFSET (0xC0000000) | 128 | #define __PAGE_OFFSET (0xC0000000) |
129 | #define __PHYSICAL_START CONFIG_PHYSICAL_START | ||
127 | #else | 130 | #else |
128 | #define __PAGE_OFFSET (0xC0000000UL) | 131 | #define __PAGE_OFFSET (0xC0000000UL) |
132 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) | ||
129 | #endif | 133 | #endif |
134 | #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START) | ||
130 | 135 | ||
131 | 136 | ||
132 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 137 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
@@ -135,11 +140,11 @@ extern int sysctl_legacy_va_layout; | |||
135 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 140 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) |
136 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 141 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
137 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 142 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
138 | #ifndef CONFIG_DISCONTIGMEM | 143 | #ifdef CONFIG_FLATMEM |
139 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 144 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
140 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | 145 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) |
141 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 146 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
142 | #endif /* !CONFIG_DISCONTIGMEM */ | 147 | #endif /* CONFIG_FLATMEM */ |
143 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 148 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
144 | 149 | ||
145 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 150 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |