Lines Matching refs:pfn

370 		unsigned long pfn = mfn_to_pfn(mfn);  in pte_mfn_to_pfn()  local
373 if (unlikely(pfn == ~0)) in pte_mfn_to_pfn()
376 val = ((pteval_t)pfn << PAGE_SHIFT) | flags; in pte_mfn_to_pfn()
385 unsigned long pfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; in pte_pfn_to_mfn() local
390 mfn = __pfn_to_mfn(pfn); in pte_pfn_to_mfn()
392 mfn = pfn; in pte_pfn_to_mfn()
728 static void xen_do_pin(unsigned level, unsigned long pfn) in xen_do_pin() argument
733 op.arg1.mfn = pfn_to_mfn(pfn); in xen_do_pin()
752 unsigned long pfn = page_to_pfn(page); in xen_pin_page() local
783 pfn_pte(pfn, PAGE_KERNEL_RO), in xen_pin_page()
787 xen_do_pin(MMUEXT_PIN_L1_TABLE, pfn); in xen_pin_page()
894 unsigned long pfn = page_to_pfn(page); in xen_unpin_page() local
909 xen_do_pin(MMUEXT_UNPIN_TABLE, pfn); in xen_unpin_page()
915 pfn_pte(pfn, PAGE_KERNEL), in xen_unpin_page()
1492 static void __init pin_pagetable_pfn(unsigned cmd, unsigned long pfn) in pin_pagetable_pfn() argument
1496 op.arg1.mfn = pfn_to_mfn(pfn); in pin_pagetable_pfn()
1503 static void __init xen_alloc_pte_init(struct mm_struct *mm, unsigned long pfn) in xen_alloc_pte_init() argument
1508 make_lowmem_page_readonly(__va(PFN_PHYS(pfn))); in xen_alloc_pte_init()
1509 pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); in xen_alloc_pte_init()
1513 static void __init xen_alloc_pmd_init(struct mm_struct *mm, unsigned long pfn) in xen_alloc_pmd_init() argument
1518 make_lowmem_page_readonly(__va(PFN_PHYS(pfn))); in xen_alloc_pmd_init()
1523 static void __init xen_release_pte_init(unsigned long pfn) in xen_release_pte_init() argument
1525 pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); in xen_release_pte_init()
1526 make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); in xen_release_pte_init()
1529 static void __init xen_release_pmd_init(unsigned long pfn) in xen_release_pmd_init() argument
1531 make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); in xen_release_pmd_init()
1534 static inline void __pin_pagetable_pfn(unsigned cmd, unsigned long pfn) in __pin_pagetable_pfn() argument
1542 op->arg1.mfn = pfn_to_mfn(pfn); in __pin_pagetable_pfn()
1547 static inline void __set_pfn_prot(unsigned long pfn, pgprot_t prot) in __set_pfn_prot() argument
1550 unsigned long addr = (unsigned long)__va(pfn << PAGE_SHIFT); in __set_pfn_prot()
1554 pfn_pte(pfn, prot), 0); in __set_pfn_prot()
1559 static inline void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn, in xen_alloc_ptpage() argument
1564 trace_xen_mmu_alloc_ptpage(mm, pfn, level, pinned); in xen_alloc_ptpage()
1567 struct page *page = pfn_to_page(pfn); in xen_alloc_ptpage()
1574 __set_pfn_prot(pfn, PAGE_KERNEL_RO); in xen_alloc_ptpage()
1577 __pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); in xen_alloc_ptpage()
1588 static void xen_alloc_pte(struct mm_struct *mm, unsigned long pfn) in xen_alloc_pte() argument
1590 xen_alloc_ptpage(mm, pfn, PT_PTE); in xen_alloc_pte()
1593 static void xen_alloc_pmd(struct mm_struct *mm, unsigned long pfn) in xen_alloc_pmd() argument
1595 xen_alloc_ptpage(mm, pfn, PT_PMD); in xen_alloc_pmd()
1599 static inline void xen_release_ptpage(unsigned long pfn, unsigned level) in xen_release_ptpage() argument
1601 struct page *page = pfn_to_page(pfn); in xen_release_ptpage()
1604 trace_xen_mmu_release_ptpage(pfn, level, pinned); in xen_release_ptpage()
1611 __pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); in xen_release_ptpage()
1613 __set_pfn_prot(pfn, PAGE_KERNEL); in xen_release_ptpage()
1621 static void xen_release_pte(unsigned long pfn) in xen_release_pte() argument
1623 xen_release_ptpage(pfn, PT_PTE); in xen_release_pte()
1626 static void xen_release_pmd(unsigned long pfn) in xen_release_pmd() argument
1628 xen_release_ptpage(pfn, PT_PMD); in xen_release_pmd()
1632 static void xen_alloc_pud(struct mm_struct *mm, unsigned long pfn) in xen_alloc_pud() argument
1634 xen_alloc_ptpage(mm, pfn, PT_PUD); in xen_alloc_pud()
1637 static void xen_release_pud(unsigned long pfn) in xen_release_pud() argument
1639 xen_release_ptpage(pfn, PT_PUD); in xen_release_pud()
1690 unsigned long pfn = __pa(addr) >> PAGE_SHIFT; in set_page_prot_flags() local
1691 pte_t pte = pfn_pte(pfn, prot); in set_page_prot_flags()
1709 unsigned long pfn; in xen_map_identity_early() local
1715 pfn = 0; in xen_map_identity_early()
1716 for (pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) { in xen_map_identity_early()
1734 for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { in xen_map_identity_early()
1737 if (pfn > max_pfn_mapped) in xen_map_identity_early()
1738 max_pfn_mapped = pfn; in xen_map_identity_early()
1743 pte = pfn_pte(pfn, PAGE_KERNEL_EXEC); in xen_map_identity_early()
1907 unsigned long pfn = PFN_DOWN(__pa(swapper_pg_dir)); in xen_write_cr3_init() local
1931 pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, pfn); in xen_write_cr3_init()
2377 static int xen_oldmem_pfn_is_ram(unsigned long pfn) in xen_oldmem_pfn_is_ram() argument
2381 .pfn = pfn, in xen_oldmem_pfn_is_ram()