Go to the documentation of this file.
8 #define _PAGE_HASHPTE 0
11 #define _PAGE_SHARED 0
14 #define _PAGE_HWWRITE 0
20 #define _PAGE_ENDIAN 0
22 #ifndef _PAGE_COHERENT
23 #define _PAGE_COHERENT 0
25 #ifndef _PAGE_WRITETHRU
26 #define _PAGE_WRITETHRU 0
29 #define _PAGE_4K_PFN 0
37 #ifndef _PMD_PRESENT_MASK
38 #define _PMD_PRESENT_MASK _PMD_PRESENT
42 #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE()
44 #ifndef _PAGE_KERNEL_RO
45 #define _PAGE_KERNEL_RO 0
47 #ifndef _PAGE_KERNEL_ROX
48 #define _PAGE_KERNEL_ROX (_PAGE_EXEC)
50 #ifndef _PAGE_KERNEL_RW
51 #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE)
53 #ifndef _PAGE_KERNEL_RWX
54 #define _PAGE_KERNEL_RWX (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE | _PAGE_EXEC)
56 #ifndef _PAGE_HPTEFLAGS
57 #define _PAGE_HPTEFLAGS _PAGE_HASHPTE
59 #ifndef _PTE_NONE_MASK
60 #define _PTE_NONE_MASK _PAGE_HPTEFLAGS
75 #define PTE_RPN_SHIFT (PAGE_SHIFT)
81 #if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
82 #define PTE_RPN_MAX (1ULL << (64 - PTE_RPN_SHIFT))
83 #define PTE_RPN_MASK (~((1ULL<<PTE_RPN_SHIFT)-1))
85 #define PTE_RPN_MAX (1UL << (32 - PTE_RPN_SHIFT))
86 #define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1))
92 #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
93 _PAGE_ACCESSED | _PAGE_SPECIAL)
96 #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \
97 _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \
98 _PAGE_USER | _PAGE_ACCESSED | \
99 _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC)
107 #define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_PSIZE)
108 #if defined(CONFIG_SMP) || defined(CONFIG_PPC_STD_MMU)
109 #define _PAGE_BASE (_PAGE_BASE_NC | _PAGE_COHERENT)
111 #define _PAGE_BASE (_PAGE_BASE_NC)
124 #define PAGE_NONE __pgprot(_PAGE_BASE)
125 #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
126 #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
127 #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
128 #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
129 #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
130 #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
132 #define __P000 PAGE_NONE
133 #define __P001 PAGE_READONLY
134 #define __P010 PAGE_COPY
135 #define __P011 PAGE_COPY
136 #define __P100 PAGE_READONLY_X
137 #define __P101 PAGE_READONLY_X
138 #define __P110 PAGE_COPY_X
139 #define __P111 PAGE_COPY_X
141 #define __S000 PAGE_NONE
142 #define __S001 PAGE_READONLY
143 #define __S010 PAGE_SHARED
144 #define __S011 PAGE_SHARED
145 #define __S100 PAGE_READONLY_X
146 #define __S101 PAGE_READONLY_X
147 #define __S110 PAGE_SHARED_X
148 #define __S111 PAGE_SHARED_X
151 #define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW)
152 #define PAGE_KERNEL_NC __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
154 #define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
155 _PAGE_NO_CACHE | _PAGE_GUARDED)
156 #define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX)
157 #define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
158 #define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_ROX)
164 #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
165 defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
166 #define PAGE_KERNEL_TEXT PAGE_KERNEL_X
168 #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
172 #define PAGE_KERNEL_EXEC PAGE_KERNEL_X
179 #define pte_user(val) ((val & _PAGE_USER) == _PAGE_USER)
182 #define PAGE_AGP (PAGE_KERNEL_NC)
183 #define HAVE_PAGE_AGP
186 #define __HAVE_ARCH_PTE_SPECIAL