Lines Matching full:pte

21  * The PTE model described here is that of the Hexagon Virtual Machine,
30 * To maximize the comfort level for the PTE manipulation macros,
39 * We have a total of 4 "soft" bits available in the abstract PTE.
43 * the PTE describes MMU programming or swap space.
99 /* Any bigger and the PTE disappears. */
136 #define pte_mkhuge(pte) __pte((pte_val(pte) & ~0x3) | HVM_HUGEPAGE_SIZE) argument
143 extern void sync_icache_dcache(pte_t pte);
145 #define pte_present_exec_user(pte) \ argument
146 ((pte_val(pte) & (_PAGE_EXECUTE | _PAGE_USER)) == \
160 * L1 PTE (PMD/PGD) has 7 in the least significant bits. For the L2 PTE
161 * (Linux PTE), the key is to have bits 11..9 all zero. We'd use 0x7
174 * Conveniently, a null PTE value is invalid.
186 * MIPS checks it against that "invalid pte table" thing.
225 * pte_none - check if pte is mapped
226 * @pte: pte_t entry
228 static inline int pte_none(pte_t pte) in pte_none() argument
230 return pte_val(pte) == _NULL_PTE; in pte_none()
236 static inline int pte_present(pte_t pte) in pte_present() argument
238 return pte_val(pte) & _PAGE_PRESENT; in pte_present()
241 /* mk_pte - make a PTE out of a page pointer and protection bits */
244 /* pte_page - returns a page (frame pointer/descriptor?) based on a PTE */
247 /* pte_mkold - mark PTE as not recently accessed */
248 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
250 pte_val(pte) &= ~_PAGE_ACCESSED; in pte_mkold()
251 return pte; in pte_mkold()
254 /* pte_mkyoung - mark PTE as recently accessed */
255 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
257 pte_val(pte) |= _PAGE_ACCESSED; in pte_mkyoung()
258 return pte; in pte_mkyoung()
262 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
264 pte_val(pte) &= ~_PAGE_DIRTY; in pte_mkclean()
265 return pte; in pte_mkclean()
269 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
271 pte_val(pte) |= _PAGE_DIRTY; in pte_mkdirty()
272 return pte; in pte_mkdirty()
275 /* pte_young - "is PTE marked as accessed"? */
276 static inline int pte_young(pte_t pte) in pte_young() argument
278 return pte_val(pte) & _PAGE_ACCESSED; in pte_young()
281 /* pte_dirty - "is PTE dirty?" */
282 static inline int pte_dirty(pte_t pte) in pte_dirty() argument
284 return pte_val(pte) & _PAGE_DIRTY; in pte_dirty()
287 /* pte_modify - set protection bits on PTE */
288 static inline pte_t pte_modify(pte_t pte, pgprot_t prot) in pte_modify() argument
290 pte_val(pte) &= PAGE_MASK; in pte_modify()
291 pte_val(pte) |= pgprot_val(prot); in pte_modify()
292 return pte; in pte_modify()
296 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
298 pte_val(pte) &= ~_PAGE_WRITE; in pte_wrprotect()
299 return pte; in pte_wrprotect()
303 static inline pte_t pte_mkwrite_novma(pte_t pte) in pte_mkwrite_novma() argument
305 pte_val(pte) |= _PAGE_WRITE; in pte_mkwrite_novma()
306 return pte; in pte_mkwrite_novma()
309 /* pte_mkexec - mark PTE as executable */
310 static inline pte_t pte_mkexec(pte_t pte) in pte_mkexec() argument
312 pte_val(pte) |= _PAGE_EXECUTE; in pte_mkexec()
313 return pte; in pte_mkexec()
316 /* pte_read - "is PTE marked as readable?" */
317 static inline int pte_read(pte_t pte) in pte_read() argument
319 return pte_val(pte) & _PAGE_READ; in pte_read()
322 /* pte_write - "is PTE marked as writable?" */
323 static inline int pte_write(pte_t pte) in pte_write() argument
325 return pte_val(pte) & _PAGE_WRITE; in pte_write()
329 /* pte_exec - "is PTE marked as executable?" */
330 static inline int pte_exec(pte_t pte) in pte_exec() argument
332 return pte_val(pte) & _PAGE_EXECUTE; in pte_exec()
335 /* __pte_to_swp_entry - extract swap entry from PTE */
336 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) argument
338 /* __swp_entry_to_pte - extract PTE from swap entry */
345 /* pte_pfn - convert pte to page frame number */
346 #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) argument
361 * Swap/file PTE definitions. If _PAGE_PRESENT is zero, the rest of the PTE is
370 * Format of swap PTE:
393 static inline int pte_swp_exclusive(pte_t pte) in pte_swp_exclusive() argument
395 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive()
398 static inline pte_t pte_swp_mkexclusive(pte_t pte) in pte_swp_mkexclusive() argument
400 pte_val(pte) |= _PAGE_SWP_EXCLUSIVE; in pte_swp_mkexclusive()
401 return pte; in pte_swp_mkexclusive()
404 static inline pte_t pte_swp_clear_exclusive(pte_t pte) in pte_swp_clear_exclusive() argument
406 pte_val(pte) &= ~_PAGE_SWP_EXCLUSIVE; in pte_swp_clear_exclusive()
407 return pte; in pte_swp_clear_exclusive()