Browse Source

[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: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Michael S. Tsirkin 20 years ago
parent
commit
6d376756f2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      drivers/infiniband/hw/mthca/mthca_provider.c

+ 3 - 3
drivers/infiniband/hw/mthca/mthca_provider.c

@@ -349,9 +349,9 @@ static int mthca_mmap_uar(struct ib_ucontext *context,
 
 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 
-	if (remap_pfn_range(vma, vma->vm_start,
-			    to_mucontext(context)->uar.pfn,
-			    PAGE_SIZE, vma->vm_page_prot))
+	if (io_remap_pfn_range(vma, vma->vm_start,
+			       to_mucontext(context)->uar.pfn,
+			       PAGE_SIZE, vma->vm_page_prot))
 		return -EAGAIN;
 
 	return 0;