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 /* pte_page - returns a page (frame pointer/descriptor?) based on a PTE */
244 /* pte_mkold - mark PTE as not recently accessed */
245 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
247 pte_val(pte) &= ~_PAGE_ACCESSED; in pte_mkold()
248 return pte; in pte_mkold()
251 /* pte_mkyoung - mark PTE as recently accessed */
252 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
254 pte_val(pte) |= _PAGE_ACCESSED; in pte_mkyoung()
255 return pte; in pte_mkyoung()
259 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
261 pte_val(pte) &= ~_PAGE_DIRTY; in pte_mkclean()
262 return pte; in pte_mkclean()
266 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
268 pte_val(pte) |= _PAGE_DIRTY; in pte_mkdirty()
269 return pte; in pte_mkdirty()
272 /* pte_young - "is PTE marked as accessed"? */
273 static inline int pte_young(pte_t pte) in pte_young() argument
275 return pte_val(pte) & _PAGE_ACCESSED; in pte_young()
278 /* pte_dirty - "is PTE dirty?" */
279 static inline int pte_dirty(pte_t pte) in pte_dirty() argument
281 return pte_val(pte) & _PAGE_DIRTY; in pte_dirty()
284 /* pte_modify - set protection bits on PTE */
285 static inline pte_t pte_modify(pte_t pte, pgprot_t prot) in pte_modify() argument
287 pte_val(pte) &= PAGE_MASK; in pte_modify()
288 pte_val(pte) |= pgprot_val(prot); in pte_modify()
289 return pte; in pte_modify()
293 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
295 pte_val(pte) &= ~_PAGE_WRITE; in pte_wrprotect()
296 return pte; in pte_wrprotect()
300 static inline pte_t pte_mkwrite_novma(pte_t pte) in pte_mkwrite_novma() argument
302 pte_val(pte) |= _PAGE_WRITE; in pte_mkwrite_novma()
303 return pte; in pte_mkwrite_novma()
306 /* pte_mkexec - mark PTE as executable */
307 static inline pte_t pte_mkexec(pte_t pte) in pte_mkexec() argument
309 pte_val(pte) |= _PAGE_EXECUTE; in pte_mkexec()
310 return pte; in pte_mkexec()
313 /* pte_read - "is PTE marked as readable?" */
314 static inline int pte_read(pte_t pte) in pte_read() argument
316 return pte_val(pte) & _PAGE_READ; in pte_read()
319 /* pte_write - "is PTE marked as writable?" */
320 static inline int pte_write(pte_t pte) in pte_write() argument
322 return pte_val(pte) & _PAGE_WRITE; in pte_write()
326 /* pte_exec - "is PTE marked as executable?" */
327 static inline int pte_exec(pte_t pte) in pte_exec() argument
329 return pte_val(pte) & _PAGE_EXECUTE; in pte_exec()
332 /* __pte_to_swp_entry - extract swap entry from PTE */
333 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) argument
335 /* __swp_entry_to_pte - extract PTE from swap entry */
342 /* pte_pfn - convert pte to page frame number */
343 #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) argument
358 * Swap/file PTE definitions. If _PAGE_PRESENT is zero, the rest of the PTE is
367 * Format of swap PTE:
390 static inline bool pte_swp_exclusive(pte_t pte) in pte_swp_exclusive() argument
392 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive()
395 static inline pte_t pte_swp_mkexclusive(pte_t pte) in pte_swp_mkexclusive() argument
397 pte_val(pte) |= _PAGE_SWP_EXCLUSIVE; in pte_swp_mkexclusive()
398 return pte; in pte_swp_mkexclusive()
401 static inline pte_t pte_swp_clear_exclusive(pte_t pte) in pte_swp_clear_exclusive() argument
403 pte_val(pte) &= ~_PAGE_SWP_EXCLUSIVE; in pte_swp_clear_exclusive()
404 return pte; in pte_swp_clear_exclusive()