Lines Matching refs:pmem
11 long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff, in __pmem_direct_access() argument
15 resource_size_t offset = PFN_PHYS(pgoff) + pmem->data_offset; in __pmem_direct_access()
17 if (unlikely(is_bad_pmem(&pmem->bb, PFN_PHYS(pgoff) / 512, in __pmem_direct_access()
25 if (get_nfit_res(pmem->phys_addr + offset)) { in __pmem_direct_access()
29 *kaddr = pmem->virt_addr + offset; in __pmem_direct_access()
30 page = vmalloc_to_page(pmem->virt_addr + offset); in __pmem_direct_access()
34 __func__, pmem, pgoff, page_to_pfn(page)); in __pmem_direct_access()
40 *kaddr = pmem->virt_addr + offset; in __pmem_direct_access()
42 *pfn = phys_to_pfn_t(pmem->phys_addr + offset, pmem->pfn_flags); in __pmem_direct_access()
48 if (unlikely(pmem->bb.count)) in __pmem_direct_access()
50 return PHYS_PFN(pmem->size - pmem->pfn_pad - offset); in __pmem_direct_access()