Lines Matching full:pte
35 static inline unsigned long pte_huge_size(pte_t pte) in pte_huge_size() argument
42 * PTE updates. This function is called whenever an existing
43 * valid PTE is updated. This does -not- include set_pte_at()
44 * which nowadays only sets a new PTE.
47 * and the PTE may be either 32 or 64 bit wide. In the later case,
48 * when using atomic updates, only the low part of the PTE is
134 /* Set the dirty and/or accessed bits atomically in a linux PTE */
151 /* Generic accessors to PTE bits */
153 static inline pte_t pte_mkwrite_novma(pte_t pte) in pte_mkwrite_novma() argument
158 return __pte(pte_val(pte) | _PAGE_RW); in pte_mkwrite_novma()
162 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
164 return __pte(pte_val(pte) | _PAGE_DIRTY); in pte_mkdirty()
167 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
169 return __pte(pte_val(pte) | _PAGE_ACCESSED); in pte_mkyoung()
173 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
175 return __pte(pte_val(pte) & ~_PAGE_WRITE); in pte_wrprotect()
180 static inline pte_t pte_mkexec(pte_t pte) in pte_mkexec() argument
182 return __pte(pte_val(pte) | _PAGE_EXEC); in pte_mkexec()
187 static inline int pte_write(pte_t pte) in pte_write() argument
189 return pte_val(pte) & _PAGE_WRITE; in pte_write()
192 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } in pte_dirty() argument
193 static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; } in pte_special() argument
194 static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; } in pte_none() argument
195 static inline bool pte_hashpte(pte_t pte) { return false; } in pte_hashpte() argument
196 static inline bool pte_ci(pte_t pte) { return pte_val(pte) & _PAGE_NO_CACHE; } in pte_ci() argument
197 static inline bool pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } in pte_exec() argument
199 static inline int pte_present(pte_t pte) in pte_present() argument
201 return pte_val(pte) & _PAGE_PRESENT; in pte_present()
204 static inline bool pte_hw_valid(pte_t pte) in pte_hw_valid() argument
206 return pte_val(pte) & _PAGE_PRESENT; in pte_hw_valid()
209 static inline int pte_young(pte_t pte) in pte_young() argument
211 return pte_val(pte) & _PAGE_ACCESSED; in pte_young()
220 static inline bool pte_read(pte_t pte) in pte_read() argument
222 return (pte_val(pte) & _PAGE_READ) == _PAGE_READ; in pte_read()
231 static inline bool pte_access_permitted(pte_t pte, bool write) in pte_access_permitted() argument
237 if (!pte_present(pte) || !pte_read(pte)) in pte_access_permitted()
240 if (write && !pte_write(pte)) in pte_access_permitted()
256 /* Generic modifiers for PTE bits */
257 static inline pte_t pte_exprotect(pte_t pte) in pte_exprotect() argument
259 return __pte(pte_val(pte) & ~_PAGE_EXEC); in pte_exprotect()
262 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
264 return __pte(pte_val(pte) & ~_PAGE_DIRTY); in pte_mkclean()
267 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
269 return __pte(pte_val(pte) & ~_PAGE_ACCESSED); in pte_mkold()
272 static inline pte_t pte_mkspecial(pte_t pte) in pte_mkspecial() argument
274 return __pte(pte_val(pte) | _PAGE_SPECIAL); in pte_mkspecial()
278 static inline pte_t pte_mkhuge(pte_t pte) in pte_mkhuge() argument
280 return __pte(pte_val(pte)); in pte_mkhuge()
284 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) in pte_modify() argument
286 return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); in pte_modify()
289 static inline int pte_swp_exclusive(pte_t pte) in pte_swp_exclusive() argument
291 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive()
294 static inline pte_t pte_swp_mkexclusive(pte_t pte) in pte_swp_mkexclusive() argument
296 return __pte(pte_val(pte) | _PAGE_SWP_EXCLUSIVE); in pte_swp_mkexclusive()
299 static inline pte_t pte_swp_clear_exclusive(pte_t pte) in pte_swp_clear_exclusive() argument
301 return __pte(pte_val(pte) & ~_PAGE_SWP_EXCLUSIVE); in pte_swp_clear_exclusive()
304 /* This low level function performs the actual PTE insertion
305 * Setting the PTE depends on the MMU type and other factors. It's
310 pte_t *ptep, pte_t pte, int percpu) in __set_pte_at() argument
312 /* Second case is 32-bit with 64-bit PTE. In this case, we in __set_pte_at()
323 : "r" (pte) : "memory"); in __set_pte_at()
326 /* Anything else just stores the PTE normally. That covers all 64-bit in __set_pte_at()
330 ptep->pte3 = ptep->pte2 = ptep->pte1 = ptep->pte = pte_val(pte); in __set_pte_at()
332 *ptep = pte; in __set_pte_at()
337 * subsequent accesses see the PTE we just wrote. Unlike userspace in __set_pte_at()
339 * the new PTE will be seen the first time. in __set_pte_at()