mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 11:13:56 +08:00
nouveau: use alloc_page_vma directly
hmm_vma_alloc_locked_page is scheduled to go away, use the proper mm function directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
d0b3517dbc
commit
721be86814
@ -148,11 +148,12 @@ nouveau_dmem_fault_alloc_and_copy(struct vm_area_struct *vma,
|
|||||||
if (!spage || !(src_pfns[i] & MIGRATE_PFN_MIGRATE))
|
if (!spage || !(src_pfns[i] & MIGRATE_PFN_MIGRATE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dpage = hmm_vma_alloc_locked_page(vma, addr);
|
dpage = alloc_page_vma(GFP_HIGHUSER, vma, addr);
|
||||||
if (!dpage) {
|
if (!dpage) {
|
||||||
dst_pfns[i] = MIGRATE_PFN_ERROR;
|
dst_pfns[i] = MIGRATE_PFN_ERROR;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
lock_page(dpage);
|
||||||
|
|
||||||
dst_pfns[i] = migrate_pfn(page_to_pfn(dpage)) |
|
dst_pfns[i] = migrate_pfn(page_to_pfn(dpage)) |
|
||||||
MIGRATE_PFN_LOCKED;
|
MIGRATE_PFN_LOCKED;
|
||||||
|
Loading…
Reference in New Issue
Block a user