Lines Matching refs:paddr
400 static unsigned long lookup_memtype(u64 paddr) in lookup_memtype() argument
405 if (x86_platform.is_untracked_pat_range(paddr, paddr + PAGE_SIZE)) in lookup_memtype()
408 if (pat_pagerange_is_ram(paddr, paddr + PAGE_SIZE)) { in lookup_memtype()
410 page = pfn_to_page(paddr >> PAGE_SHIFT); in lookup_memtype()
424 entry = rbt_memtype_lookup(paddr); in lookup_memtype()
593 static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, in reserve_pfn_range() argument
601 is_ram = pat_pagerange_is_ram(paddr, paddr + size); in reserve_pfn_range()
612 flags = lookup_memtype(paddr); in reserve_pfn_range()
617 (unsigned long long)paddr, in reserve_pfn_range()
618 (unsigned long long)(paddr + size - 1), in reserve_pfn_range()
627 ret = reserve_memtype(paddr, paddr + size, want_flags, &flags); in reserve_pfn_range()
633 !is_new_memtype_allowed(paddr, size, want_flags, flags)) { in reserve_pfn_range()
634 free_memtype(paddr, paddr + size); in reserve_pfn_range()
639 (unsigned long long)paddr, in reserve_pfn_range()
640 (unsigned long long)(paddr + size - 1), in reserve_pfn_range()
653 if (kernel_map_sync_memtype(paddr, size, flags) < 0) { in reserve_pfn_range()
654 free_memtype(paddr, paddr + size); in reserve_pfn_range()
664 static void free_pfn_range(u64 paddr, unsigned long size) in free_pfn_range() argument
668 is_ram = pat_pagerange_is_ram(paddr, paddr + size); in free_pfn_range()
670 free_memtype(paddr, paddr + size); in free_pfn_range()
682 resource_size_t paddr; in track_pfn_copy() local
692 if (follow_phys(vma, vma->vm_start, 0, &prot, &paddr)) { in track_pfn_copy()
697 return reserve_pfn_range(paddr, vma_size, &pgprot, 1); in track_pfn_copy()
711 resource_size_t paddr = (resource_size_t)pfn << PAGE_SHIFT; in track_pfn_remap() local
718 ret = reserve_pfn_range(paddr, size, prot, 0); in track_pfn_remap()
731 flags = lookup_memtype(paddr); in track_pfn_remap()
736 paddr += PAGE_SIZE; in track_pfn_remap()
737 if (flags != lookup_memtype(paddr)) in track_pfn_remap()
771 resource_size_t paddr; in untrack_pfn() local
778 paddr = (resource_size_t)pfn << PAGE_SHIFT; in untrack_pfn()
779 if (!paddr && !size) { in untrack_pfn()
780 if (follow_phys(vma, vma->vm_start, 0, &prot, &paddr)) { in untrack_pfn()
787 free_pfn_range(paddr, size); in untrack_pfn()