diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_uverbs.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_uverbs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c index 3340f49f0211..84a16bcfd536 100644 --- a/drivers/infiniband/hw/ehca/ehca_uverbs.c +++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c | |||
@@ -109,7 +109,7 @@ static int ehca_mmap_fw(struct vm_area_struct *vma, struct h_galpas *galpas, | |||
109 | u64 vsize, physical; | 109 | u64 vsize, physical; |
110 | 110 | ||
111 | vsize = vma->vm_end - vma->vm_start; | 111 | vsize = vma->vm_end - vma->vm_start; |
112 | if (vsize != EHCA_PAGESIZE) { | 112 | if (vsize < EHCA_PAGESIZE) { |
113 | ehca_gen_err("invalid vsize=%lx", vma->vm_end - vma->vm_start); | 113 | ehca_gen_err("invalid vsize=%lx", vma->vm_end - vma->vm_start); |
114 | return -EINVAL; | 114 | return -EINVAL; |
115 | } | 115 | } |
@@ -118,8 +118,8 @@ static int ehca_mmap_fw(struct vm_area_struct *vma, struct h_galpas *galpas, | |||
118 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 118 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
119 | ehca_gen_dbg("vsize=%lx physical=%lx", vsize, physical); | 119 | ehca_gen_dbg("vsize=%lx physical=%lx", vsize, physical); |
120 | /* VM_IO | VM_RESERVED are set by remap_pfn_range() */ | 120 | /* VM_IO | VM_RESERVED are set by remap_pfn_range() */ |
121 | ret = remap_pfn_range(vma, vma->vm_start, physical >> PAGE_SHIFT, | 121 | ret = remap_4k_pfn(vma, vma->vm_start, physical >> EHCA_PAGESHIFT, |
122 | vsize, vma->vm_page_prot); | 122 | vma->vm_page_prot); |
123 | if (unlikely(ret)) { | 123 | if (unlikely(ret)) { |
124 | ehca_gen_err("remap_pfn_range() failed ret=%x", ret); | 124 | ehca_gen_err("remap_pfn_range() failed ret=%x", ret); |
125 | return -ENOMEM; | 125 | return -ENOMEM; |