Skip to content

Commit e1d60ec

Browse files
Roland DreierRoland Dreier
authored andcommitted
IB/mlx4: Use pgprot_writecombine() for BlueFlame pages
The PAT work on x86 has finally made pgprot_writecombine() a usable API for modular drivers. As the comment indicates, this is exactly what we want to use in mlx4_ib to map BlueFlame pages up to userspace, since using WC for these pages improves small message latency significantly. Signed-off-by: Roland Dreier <rolandd@cisco.com>
1 parent 5d80f8e commit e1d60ec

File tree

1 file changed

+1
-2
lines changed
  • drivers/infiniband/hw/mlx4

1 file changed

+1
-2
lines changed

drivers/infiniband/hw/mlx4/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ static int mlx4_ib_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
394394
PAGE_SIZE, vma->vm_page_prot))
395395
return -EAGAIN;
396396
} else if (vma->vm_pgoff == 1 && dev->dev->caps.bf_reg_size != 0) {
397-
/* FIXME want pgprot_writecombine() for BlueFlame pages */
398-
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
397+
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
399398

400399
if (io_remap_pfn_range(vma, vma->vm_start,
401400
to_mucontext(context)->uar.pfn +

0 commit comments

Comments
 (0)