Lines Matching refs:pmd

87 #define pmd_phys(pmd)		virt_to_phys((void *)pmd_val(pmd))  argument
90 #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) argument
93 #define pmd_page_vaddr(pmd) pmd_val(pmd) argument
420 static inline int pmd_write(pmd_t pmd) argument
422 return !!(pmd_val(pmd) & _PAGE_WRITE);
425 static inline unsigned long pmd_pfn(pmd_t pmd) argument
427 return pmd_val(pmd) >> _PFN_SHIFT;
430 static inline struct page *pmd_page(pmd_t pmd) argument
432 if (pmd_val(pmd) & _PAGE_HUGE)
433 return pfn_to_page(pmd_pfn(pmd));
435 return pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT);
597 static inline int pmd_trans_huge(pmd_t pmd) argument
599 return !!(pmd_val(pmd) & _PAGE_HUGE);
602 static inline pmd_t pmd_mkhuge(pmd_t pmd) argument
604 pmd_val(pmd) |= _PAGE_HUGE;
606 return pmd;
610 pmd_t *pmdp, pmd_t pmd);
612 static inline pmd_t pmd_wrprotect(pmd_t pmd) argument
614 pmd_val(pmd) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
615 return pmd;
618 static inline pmd_t pmd_mkwrite(pmd_t pmd) argument
620 pmd_val(pmd) |= _PAGE_WRITE;
621 if (pmd_val(pmd) & _PAGE_MODIFIED)
622 pmd_val(pmd) |= _PAGE_SILENT_WRITE;
624 return pmd;
627 static inline int pmd_dirty(pmd_t pmd) argument
629 return !!(pmd_val(pmd) & _PAGE_MODIFIED);
632 static inline pmd_t pmd_mkclean(pmd_t pmd) argument
634 pmd_val(pmd) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE);
635 return pmd;
638 static inline pmd_t pmd_mkdirty(pmd_t pmd) argument
640 pmd_val(pmd) |= _PAGE_MODIFIED | _PAGE_SOFT_DIRTY;
641 if (pmd_val(pmd) & _PAGE_WRITE)
642 pmd_val(pmd) |= _PAGE_SILENT_WRITE;
644 return pmd;
647 static inline int pmd_young(pmd_t pmd) argument
649 return !!(pmd_val(pmd) & _PAGE_ACCESSED);
652 static inline pmd_t pmd_mkold(pmd_t pmd) argument
654 pmd_val(pmd) &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ);
656 return pmd;
659 static inline pmd_t pmd_mkyoung(pmd_t pmd) argument
661 pmd_val(pmd) |= _PAGE_ACCESSED;
663 if (!(pmd_val(pmd) & _PAGE_NO_READ))
664 pmd_val(pmd) |= _PAGE_SILENT_READ;
666 return pmd;
670 static inline int pmd_soft_dirty(pmd_t pmd) argument
672 return !!(pmd_val(pmd) & _PAGE_SOFT_DIRTY);
675 static inline pmd_t pmd_mksoft_dirty(pmd_t pmd) argument
677 pmd_val(pmd) |= _PAGE_SOFT_DIRTY;
678 return pmd;
681 static inline pmd_t pmd_clear_soft_dirty(pmd_t pmd) argument
683 pmd_val(pmd) &= ~(_PAGE_SOFT_DIRTY);
684 return pmd;
692 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) argument
694 pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
696 return pmd;
699 static inline pmd_t pmd_mkinvalid(pmd_t pmd) argument
701 pmd_val(pmd) &= ~(_PAGE_PRESENT | _PAGE_VALID | _PAGE_DIRTY);
703 return pmd;
724 #define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0) argument