Lines Matching refs:pmd

146 #define pmd_access_permitted(pmd, write) \  argument
147 (pte_access_permitted(pmd_pte(pmd), (write)))
163 static inline pmd_t clear_pmd_bit(pmd_t pmd, pgprot_t prot) in clear_pmd_bit() argument
165 pmd_val(pmd) &= ~pgprot_val(prot); in clear_pmd_bit()
166 return pmd; in clear_pmd_bit()
169 static inline pmd_t set_pmd_bit(pmd_t pmd, pgprot_t prot) in set_pmd_bit() argument
171 pmd_val(pmd) |= pgprot_val(prot); in set_pmd_bit()
172 return pmd; in set_pmd_bit()
245 static inline pmd_t pmd_mkcont(pmd_t pmd) in pmd_mkcont() argument
247 return __pmd(pmd_val(pmd) | PMD_SECT_CONT); in pmd_mkcont()
385 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument
387 return __pte(pmd_val(pmd)); in pmd_pte()
414 static inline int pmd_protnone(pmd_t pmd) in pmd_protnone() argument
416 return pte_protnone(pmd_pte(pmd)); in pmd_protnone()
420 #define pmd_present_invalid(pmd) (!!(pmd_val(pmd) & PMD_PRESENT_INVALID)) argument
422 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
424 return pte_present(pmd_pte(pmd)) || pmd_present_invalid(pmd); in pmd_present()
432 static inline int pmd_trans_huge(pmd_t pmd) in pmd_trans_huge() argument
434 return pmd_val(pmd) && pmd_present(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT); in pmd_trans_huge()
438 #define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd)) argument
439 #define pmd_young(pmd) pte_young(pmd_pte(pmd)) argument
440 #define pmd_valid(pmd) pte_valid(pmd_pte(pmd)) argument
441 #define pmd_cont(pmd) pte_cont(pmd_pte(pmd)) argument
442 #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) argument
443 #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) argument
444 #define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd))) argument
445 #define pmd_mkclean(pmd) pte_pmd(pte_mkclean(pmd_pte(pmd))) argument
446 #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) argument
447 #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) argument
449 static inline pmd_t pmd_mkinvalid(pmd_t pmd) in pmd_mkinvalid() argument
451 pmd = set_pmd_bit(pmd, __pgprot(PMD_PRESENT_INVALID)); in pmd_mkinvalid()
452 pmd = clear_pmd_bit(pmd, __pgprot(PMD_SECT_VALID)); in pmd_mkinvalid()
454 return pmd; in pmd_mkinvalid()
457 #define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) argument
459 #define pmd_write(pmd) pte_write(pmd_pte(pmd)) argument
461 #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) argument
464 #define pmd_devmap(pmd) pte_devmap(pmd_pte(pmd)) argument
466 static inline pmd_t pmd_mkdevmap(pmd_t pmd) in pmd_mkdevmap() argument
468 return pte_pmd(set_pte_bit(pmd_pte(pmd), __pgprot(PTE_DEVMAP))); in pmd_mkdevmap()
471 #define __pmd_to_phys(pmd) __pte_to_phys(pmd_pte(pmd)) argument
473 #define pmd_pfn(pmd) ((__pmd_to_phys(pmd) & PMD_MASK) >> PAGE_SHIFT) argument
488 #define set_pmd_at(mm, addr, pmdp, pmd) set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)) argument
532 #define pmd_none(pmd) (!pmd_val(pmd)) argument
534 #define pmd_table(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument
536 #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ argument
538 #define pmd_leaf(pmd) pmd_sect(pmd) argument
539 #define pmd_bad(pmd) (!pmd_table(pmd)) argument
541 #define pmd_leaf_size(pmd) (pmd_cont(pmd) ? CONT_PMD_SIZE : PMD_SIZE) argument
570 static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) in set_pmd() argument
574 set_swapper_pgd((pgd_t *)pmdp, __pgd(pmd_val(pmd))); in set_pmd()
579 WRITE_ONCE(*pmdp, pmd); in set_pmd()
581 if (pmd_valid(pmd)) { in set_pmd()
592 static inline phys_addr_t pmd_page_paddr(pmd_t pmd) in pmd_page_paddr() argument
594 return __pmd_to_phys(pmd); in pmd_page_paddr()
597 static inline unsigned long pmd_page_vaddr(pmd_t pmd) in pmd_page_vaddr() argument
599 return (unsigned long)__va(pmd_page_paddr(pmd)); in pmd_page_vaddr()
606 #define pte_set_fixmap_offset(pmd, addr) pte_set_fixmap(pte_offset_phys(pmd, addr)) argument
609 #define pmd_page(pmd) phys_to_page(__pmd_to_phys(pmd)) argument
772 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) in pmd_modify() argument
774 return pte_pmd(pte_modify(pmd_pte(pmd), newprot)); in pmd_modify()
903 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish()
905 return __pmd(xchg_relaxed(&pmd_val(*pmdp), pmd_val(pmd))); in pmdp_establish()
931 #define __pmd_to_swp_entry(pmd) ((swp_entry_t) { pmd_val(pmd) }) argument
988 #define update_mmu_cache_pmd(vma, address, pmd) do { } while (0) argument