Lines Matching refs:pte
65 #define set_pte(ptep, pte) native_set_pte(ptep, pte) argument
67 #define set_pte_atomic(ptep, pte) \ argument
68 native_set_pte_atomic(ptep, pte)
124 static inline int pte_dirty(pte_t pte) in pte_dirty() argument
126 return pte_flags(pte) & _PAGE_DIRTY; in pte_dirty()
129 static inline int pte_young(pte_t pte) in pte_young() argument
131 return pte_flags(pte) & _PAGE_ACCESSED; in pte_young()
154 static inline int pte_write(pte_t pte) in pte_write() argument
156 return pte_flags(pte) & _PAGE_RW; in pte_write()
159 static inline int pte_huge(pte_t pte) in pte_huge() argument
161 return pte_flags(pte) & _PAGE_PSE; in pte_huge()
164 static inline int pte_global(pte_t pte) in pte_global() argument
166 return pte_flags(pte) & _PAGE_GLOBAL; in pte_global()
169 static inline int pte_exec(pte_t pte) in pte_exec() argument
171 return !(pte_flags(pte) & _PAGE_NX); in pte_exec()
174 static inline int pte_special(pte_t pte) in pte_special() argument
176 return pte_flags(pte) & _PAGE_SPECIAL; in pte_special()
183 static inline unsigned long pte_pfn(pte_t pte) in pte_pfn() argument
185 phys_addr_t pfn = pte_val(pte); in pte_pfn()
221 #define pte_page(pte) pfn_to_page(pte_pfn(pte)) argument
224 static inline int pmd_large(pmd_t pte) in pmd_large() argument
226 return pmd_flags(pte) & _PAGE_PSE; in pmd_large()
274 static inline pte_t pte_set_flags(pte_t pte, pteval_t set) in pte_set_flags() argument
276 pteval_t v = native_pte_val(pte); in pte_set_flags()
281 static inline pte_t pte_clear_flags(pte_t pte, pteval_t clear) in pte_clear_flags() argument
283 pteval_t v = native_pte_val(pte); in pte_clear_flags()
289 static inline int pte_uffd_wp(pte_t pte) in pte_uffd_wp() argument
291 return pte_flags(pte) & _PAGE_UFFD_WP; in pte_uffd_wp()
294 static inline pte_t pte_mkuffd_wp(pte_t pte) in pte_mkuffd_wp() argument
296 return pte_set_flags(pte, _PAGE_UFFD_WP); in pte_mkuffd_wp()
299 static inline pte_t pte_clear_uffd_wp(pte_t pte) in pte_clear_uffd_wp() argument
301 return pte_clear_flags(pte, _PAGE_UFFD_WP); in pte_clear_uffd_wp()
305 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
307 return pte_clear_flags(pte, _PAGE_DIRTY); in pte_mkclean()
310 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
312 return pte_clear_flags(pte, _PAGE_ACCESSED); in pte_mkold()
315 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
317 return pte_clear_flags(pte, _PAGE_RW); in pte_wrprotect()
320 static inline pte_t pte_mkexec(pte_t pte) in pte_mkexec() argument
322 return pte_clear_flags(pte, _PAGE_NX); in pte_mkexec()
325 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
327 return pte_set_flags(pte, _PAGE_DIRTY | _PAGE_SOFT_DIRTY); in pte_mkdirty()
330 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
332 return pte_set_flags(pte, _PAGE_ACCESSED); in pte_mkyoung()
335 static inline pte_t pte_mkwrite(pte_t pte) in pte_mkwrite() argument
337 return pte_set_flags(pte, _PAGE_RW); in pte_mkwrite()
340 static inline pte_t pte_mkhuge(pte_t pte) in pte_mkhuge() argument
342 return pte_set_flags(pte, _PAGE_PSE); in pte_mkhuge()
345 static inline pte_t pte_clrhuge(pte_t pte) in pte_clrhuge() argument
347 return pte_clear_flags(pte, _PAGE_PSE); in pte_clrhuge()
350 static inline pte_t pte_mkglobal(pte_t pte) in pte_mkglobal() argument
352 return pte_set_flags(pte, _PAGE_GLOBAL); in pte_mkglobal()
355 static inline pte_t pte_clrglobal(pte_t pte) in pte_clrglobal() argument
357 return pte_clear_flags(pte, _PAGE_GLOBAL); in pte_clrglobal()
360 static inline pte_t pte_mkspecial(pte_t pte) in pte_mkspecial() argument
362 return pte_set_flags(pte, _PAGE_SPECIAL); in pte_mkspecial()
365 static inline pte_t pte_mkdevmap(pte_t pte) in pte_mkdevmap() argument
367 return pte_set_flags(pte, _PAGE_SPECIAL|_PAGE_DEVMAP); in pte_mkdevmap()
496 static inline int pte_soft_dirty(pte_t pte) in pte_soft_dirty() argument
498 return pte_flags(pte) & _PAGE_SOFT_DIRTY; in pte_soft_dirty()
511 static inline pte_t pte_mksoft_dirty(pte_t pte) in pte_mksoft_dirty() argument
513 return pte_set_flags(pte, _PAGE_SOFT_DIRTY); in pte_mksoft_dirty()
526 static inline pte_t pte_clear_soft_dirty(pte_t pte) in pte_clear_soft_dirty() argument
528 return pte_clear_flags(pte, _PAGE_SOFT_DIRTY); in pte_clear_soft_dirty()
606 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) in pte_modify() argument
608 pteval_t val = pte_val(pte), oldval = val; in pte_modify()
725 static inline int pte_none(pte_t pte) in pte_none() argument
727 return !(pte.pte & ~(_PAGE_KNL_ERRATUM_MASK)); in pte_none()
733 return a.pte == b.pte; in pte_same()
777 static inline int pte_protnone(pte_t pte) in pte_protnone() argument
779 return (pte_flags(pte) & (_PAGE_PROTNONE | _PAGE_PRESENT)) in pte_protnone()
1007 pte_t *ptep, pte_t pte) in set_pte_at() argument
1009 set_pte(ptep, pte); in set_pte_at()
1050 pte_t pte = native_ptep_get_and_clear(ptep); in ptep_get_and_clear() local
1051 return pte; in ptep_get_and_clear()
1059 pte_t pte; in ptep_get_and_clear_full() local
1065 pte = native_local_ptep_get_and_clear(ptep); in ptep_get_and_clear_full()
1067 pte = ptep_get_and_clear(mm, addr, ptep); in ptep_get_and_clear_full()
1069 return pte; in ptep_get_and_clear_full()
1076 clear_bit(_PAGE_BIT_RW, (unsigned long *)&ptep->pte); in ptep_set_wrprotect()
1269 static inline pte_t pte_swp_mksoft_dirty(pte_t pte) in pte_swp_mksoft_dirty() argument
1271 return pte_set_flags(pte, _PAGE_SWP_SOFT_DIRTY); in pte_swp_mksoft_dirty()
1274 static inline int pte_swp_soft_dirty(pte_t pte) in pte_swp_soft_dirty() argument
1276 return pte_flags(pte) & _PAGE_SWP_SOFT_DIRTY; in pte_swp_soft_dirty()
1279 static inline pte_t pte_swp_clear_soft_dirty(pte_t pte) in pte_swp_clear_soft_dirty() argument
1281 return pte_clear_flags(pte, _PAGE_SWP_SOFT_DIRTY); in pte_swp_clear_soft_dirty()
1303 static inline pte_t pte_swp_mkuffd_wp(pte_t pte) in pte_swp_mkuffd_wp() argument
1305 return pte_set_flags(pte, _PAGE_SWP_UFFD_WP); in pte_swp_mkuffd_wp()
1308 static inline int pte_swp_uffd_wp(pte_t pte) in pte_swp_uffd_wp() argument
1310 return pte_flags(pte) & _PAGE_SWP_UFFD_WP; in pte_swp_uffd_wp()
1313 static inline pte_t pte_swp_clear_uffd_wp(pte_t pte) in pte_swp_clear_uffd_wp() argument
1315 return pte_clear_flags(pte, _PAGE_SWP_UFFD_WP); in pte_swp_clear_uffd_wp()
1375 static inline bool pte_access_permitted(pte_t pte, bool write) in pte_access_permitted() argument
1377 return __pte_access_permitted(pte_val(pte), write); in pte_access_permitted()