Lines Matching full:pte
84 * 1024-entry pgdir pointing to 1-page 1024-entry PTE pages. -- paulus
107 printk(KERN_ERR "%s:%d: bad pte "PTE_FMT".\n", \
114 * Bits in a linux-style PTE. These match the bits in the
115 * (hardware-defined) PTE as closely as possible.
124 * Where possible we make the Linux PTE bits match up with this
137 * - All other bits of the PTE are loaded into TLBLO without
139 * software PTE bits. We actually use bits 21, 24, 25, and
146 #define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */
180 * PTE if CONFIG_SMP is defined (hash_page does this); there is no need
181 * to have it in the Linux PTE, and in fact the bit could be reused for
220 #define pte_none(pte) ((pte_val(pte) & ~_PTE_NONE_MASK) == 0) argument
221 #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) argument
244 static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } in pte_read() argument
245 static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } in pte_write() argument
246 static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } in pte_exec() argument
247 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } in pte_dirty() argument
248 static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } in pte_young() argument
250 static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } in pte_uncache() argument
251 static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } in pte_cache() argument
253 static inline pte_t pte_rdprotect(pte_t pte) \ in pte_rdprotect() argument
254 { pte_val(pte) &= ~_PAGE_USER; return pte; } in pte_rdprotect()
255 static inline pte_t pte_wrprotect(pte_t pte) \ in pte_wrprotect() argument
256 { pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } in pte_wrprotect()
257 static inline pte_t pte_exprotect(pte_t pte) \ in pte_exprotect() argument
258 { pte_val(pte) &= ~_PAGE_EXEC; return pte; } in pte_exprotect()
259 static inline pte_t pte_mkclean(pte_t pte) \ in pte_mkclean() argument
260 { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } in pte_mkclean()
261 static inline pte_t pte_mkold(pte_t pte) \ in pte_mkold() argument
262 { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } in pte_mkold()
264 static inline pte_t pte_mkread(pte_t pte) \ in pte_mkread() argument
265 { pte_val(pte) |= _PAGE_USER; return pte; } in pte_mkread()
266 static inline pte_t pte_mkexec(pte_t pte) \ in pte_mkexec() argument
267 { pte_val(pte) |= _PAGE_USER | _PAGE_EXEC; return pte; } in pte_mkexec()
268 static inline pte_t pte_mkwrite_novma(pte_t pte) \ in pte_mkwrite_novma() argument
269 { pte_val(pte) |= _PAGE_RW; return pte; } in pte_mkwrite_novma()
270 static inline pte_t pte_mkdirty(pte_t pte) \ in pte_mkdirty() argument
271 { pte_val(pte) |= _PAGE_DIRTY; return pte; } in pte_mkdirty()
272 static inline pte_t pte_mkyoung(pte_t pte) \ in pte_mkyoung() argument
273 { pte_val(pte) |= _PAGE_ACCESSED; return pte; } in pte_mkyoung()
282 pte_t pte; in mk_pte_phys() local
283 pte_val(pte) = physpage | pgprot_val(pgprot); in mk_pte_phys()
284 return pte; in mk_pte_phys()
287 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) in pte_modify() argument
289 pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); in pte_modify()
290 return pte; in pte_modify()
294 * Atomic PTE updates.
297 * the old pte value.
299 * 32 bits of the PTE regardless of whether PTEs are 32 or 64 bits.
322 * set_pte stores a linux PTE into the linux page table.
324 static inline void set_pte(pte_t *ptep, pte_t pte) in set_pte() argument
326 *ptep = pte; in set_pte()
366 /* our pmd entry is an effective address of pte table*/
397 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 2 }) argument
400 static inline bool pte_swp_exclusive(pte_t pte) in pte_swp_exclusive() argument
402 return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; in pte_swp_exclusive()
405 static inline pte_t pte_swp_mkexclusive(pte_t pte) in pte_swp_mkexclusive() argument
407 pte_val(pte) |= _PAGE_SWP_EXCLUSIVE; in pte_swp_mkexclusive()
408 return pte; in pte_swp_mkexclusive()
411 static inline pte_t pte_swp_clear_exclusive(pte_t pte) in pte_swp_clear_exclusive() argument
413 pte_val(pte) &= ~_PAGE_SWP_EXCLUSIVE; in pte_swp_clear_exclusive()
414 return pte; in pte_swp_clear_exclusive()