x86: define pud_flags and pud_large properly to allow non-PAE builds
[pandora-kernel.git] / arch / x86 / include / asm / pgtable_64_types.h
1 #ifndef _ASM_X86_PGTABLE_64_DEFS_H
2 #define _ASM_X86_PGTABLE_64_DEFS_H
3
4 #define SHARED_KERNEL_PMD       0
5
6 /*
7  * PGDIR_SHIFT determines what a top-level page table entry can map
8  */
9 #define PGDIR_SHIFT     39
10 #define PTRS_PER_PGD    512
11
12 /*
13  * 3rd level page
14  */
15 #define PUD_SHIFT       30
16 #define PTRS_PER_PUD    512
17
18 /*
19  * PMD_SHIFT determines the size of the area a middle-level
20  * page table can map
21  */
22 #define PMD_SHIFT       21
23 #define PTRS_PER_PMD    512
24
25 /*
26  * entries per page directory level
27  */
28 #define PTRS_PER_PTE    512
29
30 #define PMD_SIZE        (_AC(1, UL) << PMD_SHIFT)
31 #define PMD_MASK        (~(PMD_SIZE - 1))
32 #define PUD_SIZE        (_AC(1, UL) << PUD_SHIFT)
33 #define PUD_MASK        (~(PUD_SIZE - 1))
34 #define PGDIR_SIZE      (_AC(1, UL) << PGDIR_SHIFT)
35 #define PGDIR_MASK      (~(PGDIR_SIZE - 1))
36
37
38 #define MAXMEM           _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL)
39 #define VMALLOC_START    _AC(0xffffc20000000000, UL)
40 #define VMALLOC_END      _AC(0xffffe1ffffffffff, UL)
41 #define VMEMMAP_START    _AC(0xffffe20000000000, UL)
42 #define MODULES_VADDR    _AC(0xffffffffa0000000, UL)
43 #define MODULES_END      _AC(0xffffffffff000000, UL)
44 #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
45
46 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */