Lines Matching refs:pmd
193 pmd_t pmd; in pmd_basic_tests() local
199 pmd = pfn_pmd(args->fixed_pmd_pfn, prot); in pmd_basic_tests()
208 WARN_ON(pmd_dirty(pmd_wrprotect(pmd))); in pmd_basic_tests()
211 WARN_ON(!pmd_same(pmd, pmd)); in pmd_basic_tests()
212 WARN_ON(!pmd_young(pmd_mkyoung(pmd_mkold(pmd)))); in pmd_basic_tests()
213 WARN_ON(!pmd_dirty(pmd_mkdirty(pmd_mkclean(pmd)))); in pmd_basic_tests()
214 WARN_ON(!pmd_write(pmd_mkwrite(pmd_wrprotect(pmd)))); in pmd_basic_tests()
215 WARN_ON(pmd_young(pmd_mkold(pmd_mkyoung(pmd)))); in pmd_basic_tests()
216 WARN_ON(pmd_dirty(pmd_mkclean(pmd_mkdirty(pmd)))); in pmd_basic_tests()
217 WARN_ON(pmd_write(pmd_wrprotect(pmd_mkwrite(pmd)))); in pmd_basic_tests()
218 WARN_ON(pmd_dirty(pmd_wrprotect(pmd_mkclean(pmd)))); in pmd_basic_tests()
219 WARN_ON(!pmd_dirty(pmd_wrprotect(pmd_mkdirty(pmd)))); in pmd_basic_tests()
224 WARN_ON(!pmd_bad(pmd_mkhuge(pmd))); in pmd_basic_tests()
230 pmd_t pmd; in pmd_advanced_tests() local
253 pmd = pfn_pmd(args->pmd_pfn, args->page_prot); in pmd_advanced_tests()
254 set_pmd_at(args->mm, vaddr, args->pmdp, pmd); in pmd_advanced_tests()
257 pmd = READ_ONCE(*args->pmdp); in pmd_advanced_tests()
258 WARN_ON(pmd_write(pmd)); in pmd_advanced_tests()
260 pmd = READ_ONCE(*args->pmdp); in pmd_advanced_tests()
261 WARN_ON(!pmd_none(pmd)); in pmd_advanced_tests()
263 pmd = pfn_pmd(args->pmd_pfn, args->page_prot); in pmd_advanced_tests()
264 pmd = pmd_wrprotect(pmd); in pmd_advanced_tests()
265 pmd = pmd_mkclean(pmd); in pmd_advanced_tests()
266 set_pmd_at(args->mm, vaddr, args->pmdp, pmd); in pmd_advanced_tests()
268 pmd = pmd_mkwrite(pmd); in pmd_advanced_tests()
269 pmd = pmd_mkdirty(pmd); in pmd_advanced_tests()
270 pmdp_set_access_flags(args->vma, vaddr, args->pmdp, pmd, 1); in pmd_advanced_tests()
271 pmd = READ_ONCE(*args->pmdp); in pmd_advanced_tests()
272 WARN_ON(!(pmd_write(pmd) && pmd_dirty(pmd))); in pmd_advanced_tests()
274 pmd = READ_ONCE(*args->pmdp); in pmd_advanced_tests()
275 WARN_ON(!pmd_none(pmd)); in pmd_advanced_tests()
277 pmd = pmd_mkhuge(pfn_pmd(args->pmd_pfn, args->page_prot)); in pmd_advanced_tests()
278 pmd = pmd_mkyoung(pmd); in pmd_advanced_tests()
279 set_pmd_at(args->mm, vaddr, args->pmdp, pmd); in pmd_advanced_tests()
282 pmd = READ_ONCE(*args->pmdp); in pmd_advanced_tests()
283 WARN_ON(pmd_young(pmd)); in pmd_advanced_tests()
292 pmd_t pmd; in pmd_leaf_tests() local
298 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot); in pmd_leaf_tests()
303 pmd = pmd_mkhuge(pmd); in pmd_leaf_tests()
304 WARN_ON(!pmd_leaf(pmd)); in pmd_leaf_tests()
309 pmd_t pmd; in pmd_savedwrite_tests() local
318 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot_none); in pmd_savedwrite_tests()
319 WARN_ON(!pmd_savedwrite(pmd_mk_savedwrite(pmd_clear_savedwrite(pmd)))); in pmd_savedwrite_tests()
320 WARN_ON(pmd_savedwrite(pmd_clear_savedwrite(pmd_mk_savedwrite(pmd)))); in pmd_savedwrite_tests()
462 pmd_t pmd; in pmd_huge_tests() local
475 pmd = READ_ONCE(*args->pmdp); in pmd_huge_tests()
476 WARN_ON(!pmd_none(pmd)); in pmd_huge_tests()
662 pmd_t pmd = READ_ONCE(*args->pmdp); in pmd_clear_tests() local
665 pmd = __pmd(pmd_val(pmd) | RANDOM_ORVALUE); in pmd_clear_tests()
666 WRITE_ONCE(*args->pmdp, pmd); in pmd_clear_tests()
668 pmd = READ_ONCE(*args->pmdp); in pmd_clear_tests()
669 WARN_ON(!pmd_none(pmd)); in pmd_clear_tests()
674 pmd_t pmd; in pmd_populate_tests() local
682 pmd = READ_ONCE(*args->pmdp); in pmd_populate_tests()
683 WARN_ON(pmd_bad(pmd)); in pmd_populate_tests()
712 pmd_t pmd; in pmd_protnone_tests() local
721 pmd = pmd_mkhuge(pfn_pmd(args->fixed_pmd_pfn, args->page_prot_none)); in pmd_protnone_tests()
722 WARN_ON(!pmd_protnone(pmd)); in pmd_protnone_tests()
723 WARN_ON(!pmd_present(pmd)); in pmd_protnone_tests()
741 pmd_t pmd; in pmd_devmap_tests() local
747 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot); in pmd_devmap_tests()
748 WARN_ON(!pmd_devmap(pmd_mkdevmap(pmd))); in pmd_devmap_tests()
803 pmd_t pmd; in pmd_soft_dirty_tests() local
812 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot); in pmd_soft_dirty_tests()
813 WARN_ON(!pmd_soft_dirty(pmd_mksoft_dirty(pmd))); in pmd_soft_dirty_tests()
814 WARN_ON(pmd_soft_dirty(pmd_clear_soft_dirty(pmd))); in pmd_soft_dirty_tests()
819 pmd_t pmd; in pmd_swap_soft_dirty_tests() local
829 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot); in pmd_swap_soft_dirty_tests()
830 WARN_ON(!pmd_swp_soft_dirty(pmd_swp_mksoft_dirty(pmd))); in pmd_swap_soft_dirty_tests()
831 WARN_ON(pmd_swp_soft_dirty(pmd_swp_clear_soft_dirty(pmd))); in pmd_swap_soft_dirty_tests()
854 pmd_t pmd; in pmd_swap_tests() local
860 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot); in pmd_swap_tests()
861 swp = __pmd_to_swp_entry(pmd); in pmd_swap_tests()
862 pmd = __swp_entry_to_pmd(swp); in pmd_swap_tests()
863 WARN_ON(args->fixed_pmd_pfn != pmd_pfn(pmd)); in pmd_swap_tests()
940 pmd_t pmd; in pmd_thp_tests() local
957 pmd = pfn_pmd(args->fixed_pmd_pfn, args->page_prot); in pmd_thp_tests()
958 WARN_ON(!pmd_trans_huge(pmd_mkhuge(pmd))); in pmd_thp_tests()
961 WARN_ON(!pmd_trans_huge(pmd_mkinvalid(pmd_mkhuge(pmd)))); in pmd_thp_tests()
962 WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))); in pmd_thp_tests()