Lines Matching refs:pte
108 static inline int pte_none(pte_t pte) in pte_none() argument
110 return pte_is_zero(pte); in pte_none()
117 static inline int pte_read(pte_t pte) in pte_read() argument
119 return((pte_get_bits(pte, _PAGE_USER)) && in pte_read()
120 !(pte_get_bits(pte, _PAGE_PROTNONE))); in pte_read()
123 static inline int pte_exec(pte_t pte){ in pte_exec() argument
124 return((pte_get_bits(pte, _PAGE_USER)) && in pte_exec()
125 !(pte_get_bits(pte, _PAGE_PROTNONE))); in pte_exec()
128 static inline int pte_write(pte_t pte) in pte_write() argument
130 return((pte_get_bits(pte, _PAGE_RW)) && in pte_write()
131 !(pte_get_bits(pte, _PAGE_PROTNONE))); in pte_write()
134 static inline int pte_dirty(pte_t pte) in pte_dirty() argument
136 return pte_get_bits(pte, _PAGE_DIRTY); in pte_dirty()
139 static inline int pte_young(pte_t pte) in pte_young() argument
141 return pte_get_bits(pte, _PAGE_ACCESSED); in pte_young()
144 static inline int pte_newpage(pte_t pte) in pte_newpage() argument
146 return pte_get_bits(pte, _PAGE_NEWPAGE); in pte_newpage()
149 static inline int pte_newprot(pte_t pte) in pte_newprot() argument
151 return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT))); in pte_newprot()
160 static inline pte_t pte_mknewprot(pte_t pte) in pte_mknewprot() argument
162 pte_set_bits(pte, _PAGE_NEWPROT); in pte_mknewprot()
163 return(pte); in pte_mknewprot()
166 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
168 pte_clear_bits(pte, _PAGE_DIRTY); in pte_mkclean()
169 return(pte); in pte_mkclean()
172 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
174 pte_clear_bits(pte, _PAGE_ACCESSED); in pte_mkold()
175 return(pte); in pte_mkold()
178 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
180 if (likely(pte_get_bits(pte, _PAGE_RW))) in pte_wrprotect()
181 pte_clear_bits(pte, _PAGE_RW); in pte_wrprotect()
183 return pte; in pte_wrprotect()
184 return(pte_mknewprot(pte)); in pte_wrprotect()
187 static inline pte_t pte_mkread(pte_t pte) in pte_mkread() argument
189 if (unlikely(pte_get_bits(pte, _PAGE_USER))) in pte_mkread()
190 return pte; in pte_mkread()
191 pte_set_bits(pte, _PAGE_USER); in pte_mkread()
192 return(pte_mknewprot(pte)); in pte_mkread()
195 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
197 pte_set_bits(pte, _PAGE_DIRTY); in pte_mkdirty()
198 return(pte); in pte_mkdirty()
201 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
203 pte_set_bits(pte, _PAGE_ACCESSED); in pte_mkyoung()
204 return(pte); in pte_mkyoung()
207 static inline pte_t pte_mkwrite(pte_t pte) in pte_mkwrite() argument
209 if (unlikely(pte_get_bits(pte, _PAGE_RW))) in pte_mkwrite()
210 return pte; in pte_mkwrite()
211 pte_set_bits(pte, _PAGE_RW); in pte_mkwrite()
212 return(pte_mknewprot(pte)); in pte_mkwrite()
215 static inline pte_t pte_mkuptodate(pte_t pte) in pte_mkuptodate() argument
217 pte_clear_bits(pte, _PAGE_NEWPAGE); in pte_mkuptodate()
218 if(pte_present(pte)) in pte_mkuptodate()
219 pte_clear_bits(pte, _PAGE_NEWPROT); in pte_mkuptodate()
220 return(pte); in pte_mkuptodate()
223 static inline pte_t pte_mknewpage(pte_t pte) in pte_mknewpage() argument
225 pte_set_bits(pte, _PAGE_NEWPAGE); in pte_mknewpage()
226 return(pte); in pte_mknewpage()
265 ({ pte_t pte; \
267 pte_set_val(pte, page_to_phys(page), (pgprot)); \
268 if (pte_present(pte)) \
269 pte_mknewprot(pte_mknewpage(pte)); \
270 pte;})
272 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) in pte_modify() argument
274 pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot); in pte_modify()
275 return pte; in pte_modify()
297 #define __pte_to_swp_entry(pte) \ argument
298 ((swp_entry_t) { pte_val(pte_mkuptodate(pte)) })