Lines Matching full:pte
32 * One page (4 kB) of 1024 (PTRS_PER_PGD) pointers to PTE tables
42 * PTE tables (page table entry), ie. 1st-level page tables:
43 * One page (4 kB) of 1024 (PTRS_PER_PTE) PTEs with a special PTE
85 * For the Xtensa architecture, the PTE layout is as follows:
144 /* We use invalid attribute values to distinguish special pte entries */
208 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
225 * The pmd contains the kernel virtual address of the pte page.
232 * pte status.
234 # define pte_none(pte) (pte_val(pte) == (_PAGE_CA_INVALID | _PAGE_USER)) argument
236 # define pte_present(pte) ((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_CA_INVALID) argument
238 # define pte_present(pte) \ argument
239 (((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_CA_INVALID) \
240 || ((pte_val(pte) & _PAGE_ATTRIB_MASK) == _PAGE_NONE))
250 static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; } in pte_write() argument
251 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } in pte_dirty() argument
252 static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } in pte_young() argument
254 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
255 { pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; } in pte_wrprotect()
256 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
257 { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HW_WRITE); return pte; } in pte_mkclean()
258 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
259 { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } in pte_mkold()
260 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
261 { pte_val(pte) |= _PAGE_DIRTY; return pte; } in pte_mkdirty()
262 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
263 { pte_val(pte) |= _PAGE_ACCESSED; return pte; } in pte_mkyoung()
264 static inline pte_t pte_mkwrite_novma(pte_t pte) in pte_mkwrite_novma() argument
265 { pte_val(pte) |= _PAGE_WRITABLE; return pte; } in pte_mkwrite_novma()
272 #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) argument
277 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) in pte_modify() argument
279 return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); in pte_modify()
283 * Certain architectures need to do special things when pte's
298 static inline void set_pte(pte_t *ptep, pte_t pte) in set_pte() argument
300 update_pte(ptep, pte); in set_pte()
315 pte_t pte = *ptep; in ptep_test_and_clear_young() local
316 if (!pte_young(pte)) in ptep_test_and_clear_young()
318 update_pte(ptep, pte_mkold(pte)); in ptep_test_and_clear_young()
325 pte_t pte = *ptep; in ptep_get_and_clear() local
327 return pte; in ptep_get_and_clear()
333 pte_t pte = *ptep; in ptep_set_wrprotect() local
334 update_pte(ptep, pte_wrprotect(pte)); in ptep_set_wrprotect()
348 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) argument
351 static inline bool pte_swp_exclusive(pte_t pte) in pte_swp_exclusive() argument
353 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive()
356 static inline pte_t pte_swp_mkexclusive(pte_t pte) in pte_swp_mkexclusive() argument
358 pte_val(pte) |= _PAGE_SWP_EXCLUSIVE; in pte_swp_mkexclusive()
359 return pte; in pte_swp_mkexclusive()
362 static inline pte_t pte_swp_clear_exclusive(pte_t pte) in pte_swp_clear_exclusive() argument
364 pte_val(pte) &= ~_PAGE_SWP_EXCLUSIVE; in pte_swp_clear_exclusive()
365 return pte; in pte_swp_clear_exclusive()