Lines Matching refs:pte

124 static inline int pte_none(pte_t pte)  in pte_none()  argument
126 return pte_is_zero(pte); in pte_none()
133 static inline int pte_read(pte_t pte) in pte_read() argument
135 return((pte_get_bits(pte, _PAGE_USER)) && in pte_read()
136 !(pte_get_bits(pte, _PAGE_PROTNONE))); in pte_read()
139 static inline int pte_exec(pte_t pte){ in pte_exec() argument
140 return((pte_get_bits(pte, _PAGE_USER)) && in pte_exec()
141 !(pte_get_bits(pte, _PAGE_PROTNONE))); in pte_exec()
144 static inline int pte_write(pte_t pte) in pte_write() argument
146 return((pte_get_bits(pte, _PAGE_RW)) && in pte_write()
147 !(pte_get_bits(pte, _PAGE_PROTNONE))); in pte_write()
150 static inline int pte_dirty(pte_t pte) in pte_dirty() argument
152 return pte_get_bits(pte, _PAGE_DIRTY); in pte_dirty()
155 static inline int pte_young(pte_t pte) in pte_young() argument
157 return pte_get_bits(pte, _PAGE_ACCESSED); in pte_young()
160 static inline int pte_newpage(pte_t pte) in pte_newpage() argument
162 return pte_get_bits(pte, _PAGE_NEWPAGE); in pte_newpage()
165 static inline int pte_newprot(pte_t pte) in pte_newprot() argument
167 return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT))); in pte_newprot()
176 static inline pte_t pte_mknewprot(pte_t pte) in pte_mknewprot() argument
178 pte_set_bits(pte, _PAGE_NEWPROT); in pte_mknewprot()
179 return(pte); in pte_mknewprot()
182 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
184 pte_clear_bits(pte, _PAGE_DIRTY); in pte_mkclean()
185 return(pte); in pte_mkclean()
188 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
190 pte_clear_bits(pte, _PAGE_ACCESSED); in pte_mkold()
191 return(pte); in pte_mkold()
194 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
196 if (likely(pte_get_bits(pte, _PAGE_RW))) in pte_wrprotect()
197 pte_clear_bits(pte, _PAGE_RW); in pte_wrprotect()
199 return pte; in pte_wrprotect()
200 return(pte_mknewprot(pte)); in pte_wrprotect()
203 static inline pte_t pte_mkread(pte_t pte) in pte_mkread() argument
205 if (unlikely(pte_get_bits(pte, _PAGE_USER))) in pte_mkread()
206 return pte; in pte_mkread()
207 pte_set_bits(pte, _PAGE_USER); in pte_mkread()
208 return(pte_mknewprot(pte)); in pte_mkread()
211 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
213 pte_set_bits(pte, _PAGE_DIRTY); in pte_mkdirty()
214 return(pte); in pte_mkdirty()
217 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
219 pte_set_bits(pte, _PAGE_ACCESSED); in pte_mkyoung()
220 return(pte); in pte_mkyoung()
223 static inline pte_t pte_mkwrite(pte_t pte) in pte_mkwrite() argument
225 if (unlikely(pte_get_bits(pte, _PAGE_RW))) in pte_mkwrite()
226 return pte; in pte_mkwrite()
227 pte_set_bits(pte, _PAGE_RW); in pte_mkwrite()
228 return(pte_mknewprot(pte)); in pte_mkwrite()
231 static inline pte_t pte_mkuptodate(pte_t pte) in pte_mkuptodate() argument
233 pte_clear_bits(pte, _PAGE_NEWPAGE); in pte_mkuptodate()
234 if(pte_present(pte)) in pte_mkuptodate()
235 pte_clear_bits(pte, _PAGE_NEWPROT); in pte_mkuptodate()
236 return(pte); in pte_mkuptodate()
239 static inline pte_t pte_mknewpage(pte_t pte) in pte_mknewpage() argument
241 pte_set_bits(pte, _PAGE_NEWPAGE); in pte_mknewpage()
242 return(pte); in pte_mknewpage()
281 ({ pte_t pte; \
283 pte_set_val(pte, page_to_phys(page), (pgprot)); \
284 if (pte_present(pte)) \
285 pte_mknewprot(pte_mknewpage(pte)); \
286 pte;})
288 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) in pte_modify() argument
290 pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot); in pte_modify()
291 return pte; in pte_modify()
313 #define __pte_to_swp_entry(pte) \ argument
314 ((swp_entry_t) { pte_val(pte_mkuptodate(pte)) })