Home
last modified time | relevance | path

Searched refs:hmm_pfn (Results 1 – 3 of 3) sorted by relevance

/linux-6.15/include/linux/
H A Dhmm.h55 static inline struct page *hmm_pfn_to_page(unsigned long hmm_pfn) in hmm_pfn_to_page() argument
57 return pfn_to_page(hmm_pfn & ~HMM_PFN_FLAGS); in hmm_pfn_to_page()
74 static inline unsigned int hmm_pfn_to_map_order(unsigned long hmm_pfn) in hmm_pfn_to_map_order() argument
76 return (hmm_pfn >> HMM_PFN_ORDER_SHIFT) & 0x1F; in hmm_pfn_to_map_order()
/linux-6.15/drivers/gpu/drm/xe/
H A Dxe_hmm.c25 unsigned long i, npages, hmm_pfn; in xe_alloc_sg() local
43 hmm_pfn = range->hmm_pfns[i]; in xe_alloc_sg()
44 xe_assert(xe, hmm_pfn & HMM_PFN_VALID); in xe_alloc_sg()
46 len = 1UL << hmm_pfn_to_map_order(hmm_pfn); in xe_alloc_sg()
49 len -= (hmm_pfn & ~HMM_PFN_FLAGS) & (len - 1); in xe_alloc_sg()
107 unsigned long hmm_pfn, size; in xe_build_sg() local
109 hmm_pfn = range->hmm_pfns[i]; in xe_build_sg()
110 page = hmm_pfn_to_page(hmm_pfn); in xe_build_sg()
113 size = 1UL << hmm_pfn_to_map_order(hmm_pfn); in xe_build_sg()
/linux-6.15/mm/
H A Dhmm.c225 unsigned long *hmm_pfn) in hmm_vma_handle_pte() argument
232 uint64_t pfn_req_flags = *hmm_pfn; in hmm_vma_handle_pte()
239 *hmm_pfn = 0; in hmm_vma_handle_pte()
256 *hmm_pfn = swp_offset_pfn(entry) | cpu_flags; in hmm_vma_handle_pte()
263 *hmm_pfn = 0; in hmm_vma_handle_pte()
307 *hmm_pfn = HMM_PFN_ERROR; in hmm_vma_handle_pte()
311 *hmm_pfn = pte_pfn(pte) | cpu_flags; in hmm_vma_handle_pte()