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

Commit bf5f9835 authored by Yixing Liu's avatar Yixing Liu Committed by Greg Kroah-Hartman
Browse files

RDMA/hns: Modify the mapping attribute of doorbell to device

commit 39d5534b1302189c809e90641ffae8cbdc42a8fc upstream.

It is more general for ARM device drivers to use the device attribute to
map PCI BAR spaces.

Fixes: 9a443537 ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20211206133652.27476-1-liangwenpeng@huawei.com


Signed-off-by: default avatarYixing Liu <liuyixing1@huawei.com>
Signed-off-by: default avatarWenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 08d7a049
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -432,7 +432,7 @@ static int hns_roce_mmap(struct ib_ucontext *context,
		return -EINVAL;
		return -EINVAL;


	if (vma->vm_pgoff == 0) {
	if (vma->vm_pgoff == 0) {
		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
		vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
		if (io_remap_pfn_range(vma, vma->vm_start,
		if (io_remap_pfn_range(vma, vma->vm_start,
				       to_hr_ucontext(context)->uar.pfn,
				       to_hr_ucontext(context)->uar.pfn,
				       PAGE_SIZE, vma->vm_page_prot))
				       PAGE_SIZE, vma->vm_page_prot))