Lines Matching full:pmd

65 #define pmd_phys(pmd)		virt_to_phys((void *)pmd_val(pmd))  argument
67 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument
69 return pmd_val(pmd) >> _PFN_SHIFT; in pmd_pfn()
73 #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) argument
76 #define pmd_page_vaddr(pmd) pmd_val(pmd) argument
403 static inline int pmd_write(pmd_t pmd) argument
405 return !!(pmd_val(pmd) & _PAGE_WRITE);
408 static inline struct page *pmd_page(pmd_t pmd) argument
410 if (pmd_val(pmd) & _PAGE_HUGE)
411 return pfn_to_page(pmd_pfn(pmd));
413 return pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT);
575 static inline int pmd_trans_huge(pmd_t pmd) argument
577 return !!(pmd_val(pmd) & _PAGE_HUGE);
580 static inline pmd_t pmd_mkhuge(pmd_t pmd) argument
582 pmd_val(pmd) |= _PAGE_HUGE;
584 return pmd;
588 pmd_t *pmdp, pmd_t pmd);
590 static inline pmd_t pmd_wrprotect(pmd_t pmd) argument
592 pmd_val(pmd) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
593 return pmd;
596 static inline pmd_t pmd_mkwrite(pmd_t pmd) argument
598 pmd_val(pmd) |= _PAGE_WRITE;
599 if (pmd_val(pmd) & _PAGE_MODIFIED)
600 pmd_val(pmd) |= _PAGE_SILENT_WRITE;
602 return pmd;
605 static inline int pmd_dirty(pmd_t pmd) argument
607 return !!(pmd_val(pmd) & _PAGE_MODIFIED);
610 static inline pmd_t pmd_mkclean(pmd_t pmd) argument
612 pmd_val(pmd) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE);
613 return pmd;
616 static inline pmd_t pmd_mkdirty(pmd_t pmd) argument
618 pmd_val(pmd) |= _PAGE_MODIFIED | _PAGE_SOFT_DIRTY;
619 if (pmd_val(pmd) & _PAGE_WRITE)
620 pmd_val(pmd) |= _PAGE_SILENT_WRITE;
622 return pmd;
626 static inline int pmd_young(pmd_t pmd) argument
628 return !!(pmd_val(pmd) & _PAGE_ACCESSED);
631 static inline pmd_t pmd_mkold(pmd_t pmd) argument
633 pmd_val(pmd) &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ);
635 return pmd;
638 static inline pmd_t pmd_mkyoung(pmd_t pmd) argument
640 pmd_val(pmd) |= _PAGE_ACCESSED;
642 if (!(pmd_val(pmd) & _PAGE_NO_READ))
643 pmd_val(pmd) |= _PAGE_SILENT_READ;
645 return pmd;
649 static inline int pmd_soft_dirty(pmd_t pmd) argument
651 return !!(pmd_val(pmd) & _PAGE_SOFT_DIRTY);
654 static inline pmd_t pmd_mksoft_dirty(pmd_t pmd) argument
656 pmd_val(pmd) |= _PAGE_SOFT_DIRTY;
657 return pmd;
660 static inline pmd_t pmd_clear_soft_dirty(pmd_t pmd) argument
662 pmd_val(pmd) &= ~(_PAGE_SOFT_DIRTY);
663 return pmd;
671 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) argument
673 pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
675 return pmd;
678 static inline pmd_t pmd_mkinvalid(pmd_t pmd) argument
680 pmd_val(pmd) &= ~(_PAGE_PRESENT | _PAGE_VALID | _PAGE_DIRTY);
682 return pmd;
703 #define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0) argument