Commit 0b7a96114bd5991d355a1f1c1d3d9c0c9d9c1cfc
Committed by
Linus Torvalds
1 parent
b3bdda02aa
Exists in
master
and in
7 other branches
i386: Resolve dependency of asm-i386/pgtable.h on highmem.h
pgtable.h does not include highmem.h but uses various constants from highmem.h. We cannot include highmem.h because highmem.h will in turn include many other include files that also depend on pgtable.h So move the definitions from highmem.h into pgtable.h. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 8 additions and 6 deletions Side-by-side Diff
include/asm-x86/highmem.h
... | ... | @@ -38,11 +38,6 @@ |
38 | 38 | * easily, subsequent pte tables have to be allocated in one physical |
39 | 39 | * chunk of RAM. |
40 | 40 | */ |
41 | -#ifdef CONFIG_X86_PAE | |
42 | -#define LAST_PKMAP 512 | |
43 | -#else | |
44 | -#define LAST_PKMAP 1024 | |
45 | -#endif | |
46 | 41 | /* |
47 | 42 | * Ordering is: |
48 | 43 | * |
... | ... | @@ -58,7 +53,6 @@ |
58 | 53 | * VMALLOC_START |
59 | 54 | * high_memory |
60 | 55 | */ |
61 | -#define PKMAP_BASE ( (FIXADDR_BOOT_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK ) | |
62 | 56 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) |
63 | 57 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) |
64 | 58 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) |
include/asm-x86/pgtable_32.h
... | ... | @@ -66,6 +66,14 @@ |
66 | 66 | #define VMALLOC_OFFSET (8*1024*1024) |
67 | 67 | #define VMALLOC_START (((unsigned long) high_memory + \ |
68 | 68 | 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1)) |
69 | +#ifdef CONFIG_X86_PAE | |
70 | +#define LAST_PKMAP 512 | |
71 | +#else | |
72 | +#define LAST_PKMAP 1024 | |
73 | +#endif | |
74 | + | |
75 | +#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK) | |
76 | + | |
69 | 77 | #ifdef CONFIG_HIGHMEM |
70 | 78 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) |
71 | 79 | #else |