diff options
-rw-r--r-- | include/asm-x86/page.h | 23 | ||||
-rw-r--r-- | include/asm-x86/page_32.h | 17 | ||||
-rw-r--r-- | include/asm-x86/page_64.h | 13 |
3 files changed, 23 insertions, 30 deletions
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 9830eeb57173..f65a2ae6e323 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -80,6 +80,10 @@ | |||
80 | void clear_page(void *page); | 80 | void clear_page(void *page); |
81 | void copy_page(void *to, void *from); | 81 | void copy_page(void *to, void *from); |
82 | 82 | ||
83 | extern unsigned long end_pfn; | ||
84 | extern unsigned long end_pfn_map; | ||
85 | extern unsigned long phys_base; | ||
86 | |||
83 | extern unsigned long __phys_addr(unsigned long); | 87 | extern unsigned long __phys_addr(unsigned long); |
84 | #define __phys_reloc_hide(x) (x) | 88 | #define __phys_reloc_hide(x) (x) |
85 | 89 | ||
@@ -98,6 +102,8 @@ typedef struct { pteval_t pte; } pte_t; | |||
98 | #define native_pte_val(x) ((x).pte) | 102 | #define native_pte_val(x) ((x).pte) |
99 | #define native_make_pte(x) ((pte_t) { (x) } ) | 103 | #define native_make_pte(x) ((pte_t) { (x) } ) |
100 | 104 | ||
105 | #define vmemmap ((struct page *)VMEMMAP_START) | ||
106 | |||
101 | #endif /* !__ASSEMBLY__ */ | 107 | #endif /* !__ASSEMBLY__ */ |
102 | 108 | ||
103 | #endif /* CONFIG_X86_64 */ | 109 | #endif /* CONFIG_X86_64 */ |
@@ -184,6 +190,19 @@ static inline pte_t native_make_pte(unsigned long val) | |||
184 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 190 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
185 | #endif /* CONFIG_FLATMEM */ | 191 | #endif /* CONFIG_FLATMEM */ |
186 | 192 | ||
193 | extern int nx_enabled; | ||
194 | |||
195 | /* | ||
196 | * This much address space is reserved for vmalloc() and iomap() | ||
197 | * as well as fixmap mappings. | ||
198 | */ | ||
199 | extern unsigned int __VMALLOC_RESERVE; | ||
200 | extern int sysctl_legacy_va_layout; | ||
201 | extern int page_is_ram(unsigned long pagenr); | ||
202 | |||
203 | #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | ||
204 | #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) | ||
205 | |||
187 | #ifdef CONFIG_X86_USE_3DNOW | 206 | #ifdef CONFIG_X86_USE_3DNOW |
188 | #include <asm/mmx.h> | 207 | #include <asm/mmx.h> |
189 | 208 | ||
@@ -325,6 +344,10 @@ static inline pmdval_t native_pmd_val(pmd_t pmd) | |||
325 | 344 | ||
326 | #endif /* __ASSEMBLY__ */ | 345 | #endif /* __ASSEMBLY__ */ |
327 | 346 | ||
347 | #include <asm-generic/memory_model.h> | ||
348 | #include <asm-generic/page.h> | ||
349 | |||
350 | #define __HAVE_ARCH_GATE_AREA 1 | ||
328 | 351 | ||
329 | #ifdef CONFIG_X86_32 | 352 | #ifdef CONFIG_X86_32 |
330 | # include "page_32.h" | 353 | # include "page_32.h" |
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index a27424a2ee0d..c27b41fd0254 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -7,7 +7,6 @@ | |||
7 | /* | 7 | /* |
8 | * These are used to make use of C type-checking.. | 8 | * These are used to make use of C type-checking.. |
9 | */ | 9 | */ |
10 | extern int nx_enabled; | ||
11 | 10 | ||
12 | #endif /* !__ASSEMBLY__ */ | 11 | #endif /* !__ASSEMBLY__ */ |
13 | 12 | ||
@@ -15,26 +14,10 @@ extern int nx_enabled; | |||
15 | 14 | ||
16 | struct vm_area_struct; | 15 | struct vm_area_struct; |
17 | 16 | ||
18 | /* | ||
19 | * This much address space is reserved for vmalloc() and iomap() | ||
20 | * as well as fixmap mappings. | ||
21 | */ | ||
22 | extern unsigned int __VMALLOC_RESERVE; | ||
23 | |||
24 | extern int sysctl_legacy_va_layout; | ||
25 | |||
26 | extern int page_is_ram(unsigned long pagenr); | ||
27 | |||
28 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
29 | 18 | ||
30 | #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | ||
31 | #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) | ||
32 | |||
33 | 19 | ||
34 | #include <asm-generic/memory_model.h> | ||
35 | #include <asm-generic/page.h> | ||
36 | 20 | ||
37 | #define __HAVE_ARCH_GATE_AREA 1 | ||
38 | #endif /* __KERNEL__ */ | 21 | #endif /* __KERNEL__ */ |
39 | 22 | ||
40 | #endif /* _I386_PAGE_H */ | 23 | #endif /* _I386_PAGE_H */ |
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h index 7094684270a6..94d4803aab2d 100644 --- a/include/asm-x86/page_64.h +++ b/include/asm-x86/page_64.h | |||
@@ -4,26 +4,13 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
6 | 6 | ||
7 | extern unsigned long end_pfn; | ||
8 | extern unsigned long end_pfn_map; | ||
9 | |||
10 | |||
11 | extern unsigned long phys_base; | ||
12 | |||
13 | #endif /* !__ASSEMBLY__ */ | 7 | #endif /* !__ASSEMBLY__ */ |
14 | 8 | ||
15 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
16 | 10 | ||
17 | #include <asm/bug.h> | ||
18 | 11 | ||
19 | #endif /* __ASSEMBLY__ */ | 12 | #endif /* __ASSEMBLY__ */ |
20 | 13 | ||
21 | #define __HAVE_ARCH_GATE_AREA 1 | ||
22 | #define vmemmap ((struct page *)VMEMMAP_START) | ||
23 | |||
24 | #include <asm-generic/memory_model.h> | ||
25 | #include <asm-generic/page.h> | ||
26 | |||
27 | #endif /* __KERNEL__ */ | 14 | #endif /* __KERNEL__ */ |
28 | 15 | ||
29 | #ifdef CONFIG_FLATMEM | 16 | #ifdef CONFIG_FLATMEM |