Message ID | 20200324011457.2817-7-jgg@ziepe.ca (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,hmm,1/9] mm/hmm: remove pgmap checking for devmap pages | expand |
On Mon, Mar 23, 2020 at 10:14:54PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe <jgg@mellanox.com> > > swp_offset() should not be called directly, the wrappers are supposed to > abstract away the encoding of the device_private specific information in > the swap entry. > > Reviewed-by: Ralph Campbell <rcampbell@nvidia.com> > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/mm/hmm.c b/mm/hmm.c index f59e59fb303e95..e114110ad498a2 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -266,7 +266,7 @@ static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr, */ if (hmm_is_device_private_entry(range, entry)) { *pfn = hmm_device_entry_from_pfn(range, - swp_offset(entry)); + device_private_entry_to_pfn(entry)); *pfn |= range->flags[HMM_PFN_VALID]; if (is_write_device_private_entry(entry)) *pfn |= range->flags[HMM_PFN_WRITE];