1
2 #ifndef _ASM_X86_PGTABLE_32_DEFS_H
3 #define _ASM_X86_PGTABLE_32_DEFS_H
4
5
6
7
8
9
10 #ifdef CONFIG_X86_PAE
11 # include <asm/pgtable-3level_types.h>
12 # define PMD_SIZE (1UL << PMD_SHIFT)
13 # define PMD_MASK (~(PMD_SIZE - 1))
14 #else
15 # include <asm/pgtable-2level_types.h>
16 #endif
17
18 #define pgtable_l5_enabled() 0
19
20 #define PGDIR_SIZE (1UL << PGDIR_SHIFT)
21 #define PGDIR_MASK (~(PGDIR_SIZE - 1))
22
23
24
25
26
27
28
29
30 #define VMALLOC_OFFSET (8 * 1024 * 1024)
31
32 #ifndef __ASSEMBLY__
33 extern bool __vmalloc_start_set;
34 #endif
35
36 #define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
37 #ifdef CONFIG_X86_PAE
38 #define LAST_PKMAP 512
39 #else
40 #define LAST_PKMAP 1024
41 #endif
42
43
44
45
46
47 #define CPU_ENTRY_AREA_PAGES (NR_CPUS * 39)
48
49
50 #define CPU_ENTRY_AREA_BASE \
51 ((FIXADDR_TOT_START - PAGE_SIZE*(CPU_ENTRY_AREA_PAGES+1)) & PMD_MASK)
52
53 #define LDT_BASE_ADDR \
54 ((CPU_ENTRY_AREA_BASE - PAGE_SIZE) & PMD_MASK)
55
56 #define LDT_END_ADDR (LDT_BASE_ADDR + PMD_SIZE)
57
58 #define PKMAP_BASE \
59 ((LDT_BASE_ADDR - PAGE_SIZE) & PMD_MASK)
60
61 #ifdef CONFIG_HIGHMEM
62 # define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)
63 #else
64 # define VMALLOC_END (LDT_BASE_ADDR - 2 * PAGE_SIZE)
65 #endif
66
67 #define MODULES_VADDR VMALLOC_START
68 #define MODULES_END VMALLOC_END
69 #define MODULES_LEN (MODULES_VADDR - MODULES_END)
70
71 #define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)
72
73 #endif