diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-01 19:46:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:16:28 -0400 |
commit | 8490638cf0fb3975f7636c5268f27d5daf4eaaa5 (patch) | |
tree | 1c00505506c86ce1f37410666c1d6b57336ddbc8 /include/asm-x86 | |
parent | 574977a2edde0148ea365008dceb0c2594d10b11 (diff) |
x86: always set _PAGE_GLOBAL in _PAGE_KERNEL* flags
Consistently set _PAGE_GLOBAL in _PAGE_KERNEL flags. This makes 32-
and 64-bit code consistent, and removes some special cases where
__PAGE_KERNEL* did not have _PAGE_GLOBAL set, causing confusion as a
result of the inconsistencies.
This patch only affects x86-64, which generally always supports PGD.
The x86-32 patch is next.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/pgtable.h | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 85f851a0b998..a1c0009e81b7 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -88,7 +88,7 @@ extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC; | |||
88 | #endif /* __ASSEMBLY__ */ | 88 | #endif /* __ASSEMBLY__ */ |
89 | #else | 89 | #else |
90 | #define __PAGE_KERNEL_EXEC \ | 90 | #define __PAGE_KERNEL_EXEC \ |
91 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) | 91 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL) |
92 | #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) | 92 | #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) |
93 | #endif | 93 | #endif |
94 | 94 | ||
@@ -103,24 +103,18 @@ extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC; | |||
103 | #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) | 103 | #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) |
104 | #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) | 104 | #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) |
105 | 105 | ||
106 | #ifdef CONFIG_X86_32 | 106 | #define PAGE_KERNEL __pgprot(__PAGE_KERNEL) |
107 | # define MAKE_GLOBAL(x) __pgprot((x)) | 107 | #define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO) |
108 | #else | 108 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) |
109 | # define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL) | 109 | #define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX) |
110 | #endif | 110 | #define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC) |
111 | 111 | #define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE) | |
112 | #define PAGE_KERNEL MAKE_GLOBAL(__PAGE_KERNEL) | 112 | #define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS) |
113 | #define PAGE_KERNEL_RO MAKE_GLOBAL(__PAGE_KERNEL_RO) | 113 | #define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE) |
114 | #define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC) | 114 | #define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE) |
115 | #define PAGE_KERNEL_RX MAKE_GLOBAL(__PAGE_KERNEL_RX) | 115 | #define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC) |
116 | #define PAGE_KERNEL_WC MAKE_GLOBAL(__PAGE_KERNEL_WC) | 116 | #define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL) |
117 | #define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE) | 117 | #define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE) |
118 | #define PAGE_KERNEL_UC_MINUS MAKE_GLOBAL(__PAGE_KERNEL_UC_MINUS) | ||
119 | #define PAGE_KERNEL_EXEC_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_EXEC_NOCACHE) | ||
120 | #define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE) | ||
121 | #define PAGE_KERNEL_LARGE_EXEC MAKE_GLOBAL(__PAGE_KERNEL_LARGE_EXEC) | ||
122 | #define PAGE_KERNEL_VSYSCALL MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL) | ||
123 | #define PAGE_KERNEL_VSYSCALL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL_NOCACHE) | ||
124 | 118 | ||
125 | /* xwr */ | 119 | /* xwr */ |
126 | #define __P000 PAGE_NONE | 120 | #define __P000 PAGE_NONE |