Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d376756 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Roland Dreier
Browse files

[IB/mthca]: Use io_remap_pfn_range for PCI space



Use io_remap_pfn_range to remap IO pages (remap_pfn_range is for memory).

Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 2181858b
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -349,7 +349,7 @@ static int mthca_mmap_uar(struct ib_ucontext *context,


	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);


	if (remap_pfn_range(vma, vma->vm_start,
	if (io_remap_pfn_range(vma, vma->vm_start,
			       to_mucontext(context)->uar.pfn,
			       to_mucontext(context)->uar.pfn,
			       PAGE_SIZE, vma->vm_page_prot))
			       PAGE_SIZE, vma->vm_page_prot))
		return -EAGAIN;
		return -EAGAIN;