Lines Matching refs:pte
248 pte_t pte = pfn_pte(page_nr, pgprot); in pfn_pmd() local
250 return __pmd(pte_val(pte)); in pfn_pmd()
256 static inline unsigned long pte_pfn(pte_t pte) in pte_pfn() argument
269 : "r" (pte_val(pte)), in pte_pfn()
277 static inline pte_t pte_modify(pte_t pte, pgprot_t prot) in pte_modify() argument
332 return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask)); in pte_modify()
338 pte_t pte = __pte(pmd_val(pmd)); in pmd_modify() local
340 pte = pte_modify(pte, newprot); in pmd_modify()
342 return __pmd(pte_val(pte)); in pmd_modify()
397 static inline pte_t pte_mkhuge(pte_t pte) in pte_mkhuge() argument
399 return __pte(pte_val(pte) | __pte_default_huge_mask()); in pte_mkhuge()
402 static inline bool is_default_hugetlb_pte(pte_t pte) in is_default_hugetlb_pte() argument
406 return (pte_val(pte) & mask) == mask; in is_default_hugetlb_pte()
422 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkhuge() local
424 pte = pte_mkhuge(pte); in pmd_mkhuge()
425 pte_val(pte) |= _PAGE_PMD_HUGE; in pmd_mkhuge()
427 return __pmd(pte_val(pte)); in pmd_mkhuge()
431 static inline bool is_hugetlb_pte(pte_t pte) in is_hugetlb_pte() argument
437 static inline pte_t pte_mkdirty(pte_t pte) in pte_mkdirty() argument
439 unsigned long val = pte_val(pte), tmp; in pte_mkdirty()
461 static inline pte_t pte_mkclean(pte_t pte) in pte_mkclean() argument
463 unsigned long val = pte_val(pte), tmp; in pte_mkclean()
485 static inline pte_t pte_mkwrite(pte_t pte) in pte_mkwrite() argument
487 unsigned long val = pte_val(pte), mask; in pte_mkwrite()
503 static inline pte_t pte_wrprotect(pte_t pte) in pte_wrprotect() argument
505 unsigned long val = pte_val(pte), tmp; in pte_wrprotect()
527 static inline pte_t pte_mkold(pte_t pte) in pte_mkold() argument
544 return __pte(pte_val(pte) & ~mask); in pte_mkold()
547 static inline pte_t pte_mkyoung(pte_t pte) in pte_mkyoung() argument
564 return __pte(pte_val(pte) | mask); in pte_mkyoung()
567 static inline pte_t pte_mkspecial(pte_t pte) in pte_mkspecial() argument
569 pte_val(pte) |= _PAGE_SPECIAL; in pte_mkspecial()
570 return pte; in pte_mkspecial()
573 static inline pte_t pte_mkmcd(pte_t pte) in pte_mkmcd() argument
575 pte_val(pte) |= _PAGE_MCD_4V; in pte_mkmcd()
576 return pte; in pte_mkmcd()
579 static inline pte_t pte_mknotmcd(pte_t pte) in pte_mknotmcd() argument
581 pte_val(pte) &= ~_PAGE_MCD_4V; in pte_mknotmcd()
582 return pte; in pte_mknotmcd()
585 static inline unsigned long pte_young(pte_t pte) in pte_young() argument
600 return (pte_val(pte) & mask); in pte_young()
603 static inline unsigned long pte_dirty(pte_t pte) in pte_dirty() argument
618 return (pte_val(pte) & mask); in pte_dirty()
621 static inline unsigned long pte_write(pte_t pte) in pte_write() argument
636 return (pte_val(pte) & mask); in pte_write()
639 static inline unsigned long pte_exec(pte_t pte) in pte_exec() argument
652 return (pte_val(pte) & mask); in pte_exec()
655 static inline unsigned long pte_present(pte_t pte) in pte_present() argument
657 unsigned long val = pte_val(pte); in pte_present()
677 static inline unsigned long pte_special(pte_t pte) in pte_special() argument
679 return pte_val(pte) & _PAGE_SPECIAL; in pte_special()
685 pte_t pte = __pte(pmd_val(pmd)); in pmd_large() local
687 return pte_val(pte) & _PAGE_PMD_HUGE; in pmd_large()
692 pte_t pte = __pte(pmd_val(pmd)); in pmd_pfn() local
694 return pte_pfn(pte); in pmd_pfn()
700 pte_t pte = __pte(pmd_val(pmd)); in pmd_write() local
702 return pte_write(pte); in pmd_write()
710 pte_t pte = __pte(pmd_val(pmd)); in pmd_dirty() local
712 return pte_dirty(pte); in pmd_dirty()
717 pte_t pte = __pte(pmd_val(pmd)); in pmd_young() local
719 return pte_young(pte); in pmd_young()
724 pte_t pte = __pte(pmd_val(pmd)); in pmd_trans_huge() local
726 return pte_val(pte) & _PAGE_PMD_HUGE; in pmd_trans_huge()
731 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkold() local
733 pte = pte_mkold(pte); in pmd_mkold()
735 return __pmd(pte_val(pte)); in pmd_mkold()
740 pte_t pte = __pte(pmd_val(pmd)); in pmd_wrprotect() local
742 pte = pte_wrprotect(pte); in pmd_wrprotect()
744 return __pmd(pte_val(pte)); in pmd_wrprotect()
749 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkdirty() local
751 pte = pte_mkdirty(pte); in pmd_mkdirty()
753 return __pmd(pte_val(pte)); in pmd_mkdirty()
758 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkclean() local
760 pte = pte_mkclean(pte); in pmd_mkclean()
762 return __pmd(pte_val(pte)); in pmd_mkclean()
767 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkyoung() local
769 pte = pte_mkyoung(pte); in pmd_mkyoung()
771 return __pmd(pte_val(pte)); in pmd_mkyoung()
776 pte_t pte = __pte(pmd_val(pmd)); in pmd_mkwrite() local
778 pte = pte_mkwrite(pte); in pmd_mkwrite()
780 return __pmd(pte_val(pte)); in pmd_mkwrite()
836 pte_t pte = __pte(pmd_val(pmd)); in pmd_page_vaddr() local
839 pfn = pte_pfn(pte); in pmd_page_vaddr()
846 pte_t pte = __pte(pud_val(pud)); in pud_pgtable() local
849 pfn = pte_pfn(pte); in pud_pgtable()
870 pte_t pte = __pte(pud_val(pud)); in pud_large() local
872 return pte_val(pte) & _PAGE_PMD_HUGE; in pud_large()
877 pte_t pte = __pte(pud_val(pud)); in pud_pfn() local
879 return pte_pfn(pte); in pud_pfn()
883 #define pte_none(pte) (!pte_val(pte)) argument
921 pte_t *ptep, pte_t pte, int fullmm) in __set_pte_at() argument
925 *ptep = pte; in __set_pte_at()
929 #define set_pte_at(mm,addr,ptep,pte) \ argument
930 __set_pte_at((mm), (addr), (ptep), (pte), 0)
941 #define move_pte(pte, prot, old_addr, new_addr) \ argument
943 pte_t newpte = (pte); \
944 if (tlb_type != hypervisor && pte_present(pte)) { \
945 unsigned long this_pfn = pte_pfn(pte); \
991 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) argument
1008 unsigned long addr, pte_t pte);
1017 pte_t pte, pte_t oldpte) in arch_do_swap_page() argument
1026 if (adi_state.enabled && (pte_val(pte) & _PAGE_MCD_4V)) in arch_do_swap_page()
1027 adi_restore_tags(mm, vma, addr, pte); in arch_do_swap_page()
1077 static inline bool pte_access_permitted(pte_t pte, bool write) in pte_access_permitted() argument
1091 return (pte_val(pte) & (prot | _PAGE_SPECIAL)) == prot; in pte_access_permitted()
1131 extern unsigned long pte_leaf_size(pte_t pte);