diff options
Diffstat (limited to 'arch/powerpc/include/asm/pte-common.h')
-rw-r--r-- | arch/powerpc/include/asm/pte-common.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index e040c3595129..2aef9b7a0eb2 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h | |||
@@ -34,6 +34,12 @@ | |||
34 | #ifndef _PAGE_PSIZE | 34 | #ifndef _PAGE_PSIZE |
35 | #define _PAGE_PSIZE 0 | 35 | #define _PAGE_PSIZE 0 |
36 | #endif | 36 | #endif |
37 | /* _PAGE_RO and _PAGE_RW shall not be defined at the same time */ | ||
38 | #ifndef _PAGE_RO | ||
39 | #define _PAGE_RO 0 | ||
40 | #else | ||
41 | #define _PAGE_RW 0 | ||
42 | #endif | ||
37 | #ifndef _PMD_PRESENT_MASK | 43 | #ifndef _PMD_PRESENT_MASK |
38 | #define _PMD_PRESENT_MASK _PMD_PRESENT | 44 | #define _PMD_PRESENT_MASK _PMD_PRESENT |
39 | #endif | 45 | #endif |
@@ -42,10 +48,10 @@ | |||
42 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() | 48 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() |
43 | #endif | 49 | #endif |
44 | #ifndef _PAGE_KERNEL_RO | 50 | #ifndef _PAGE_KERNEL_RO |
45 | #define _PAGE_KERNEL_RO 0 | 51 | #define _PAGE_KERNEL_RO (_PAGE_RO) |
46 | #endif | 52 | #endif |
47 | #ifndef _PAGE_KERNEL_ROX | 53 | #ifndef _PAGE_KERNEL_ROX |
48 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC) | 54 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC | _PAGE_RO) |
49 | #endif | 55 | #endif |
50 | #ifndef _PAGE_KERNEL_RW | 56 | #ifndef _PAGE_KERNEL_RW |
51 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) | 57 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) |
@@ -95,7 +101,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
95 | /* Mask of bits returned by pte_pgprot() */ | 101 | /* Mask of bits returned by pte_pgprot() */ |
96 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ | 102 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ |
97 | _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ | 103 | _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ |
98 | _PAGE_USER | _PAGE_ACCESSED | \ | 104 | _PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | \ |
99 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) | 105 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) |
100 | 106 | ||
101 | #ifdef CONFIG_NUMA_BALANCING | 107 | #ifdef CONFIG_NUMA_BALANCING |
@@ -128,11 +134,14 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
128 | */ | 134 | */ |
129 | #define PAGE_NONE __pgprot(_PAGE_BASE) | 135 | #define PAGE_NONE __pgprot(_PAGE_BASE) |
130 | #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW) | 136 | #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW) |
131 | #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC) | 137 | #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | \ |
132 | #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER) | 138 | _PAGE_EXEC) |
133 | #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC) | 139 | #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO) |
134 | #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER) | 140 | #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO | \ |
135 | #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC) | 141 | _PAGE_EXEC) |
142 | #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO) | ||
143 | #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO | \ | ||
144 | _PAGE_EXEC) | ||
136 | 145 | ||
137 | #define __P000 PAGE_NONE | 146 | #define __P000 PAGE_NONE |
138 | #define __P001 PAGE_READONLY | 147 | #define __P001 PAGE_READONLY |