mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
RDMA/hns: Modify the mapping attribute of doorbell to device
commit39d5534b13upstream. It is more general for ARM device drivers to use the device attribute to map PCI BAR spaces. Fixes:9a4435375c("IB/hns: Add driver files for hns RoCE driver") Link: https://lore.kernel.org/r/20211206133652.27476-1-liangwenpeng@huawei.com Signed-off-by: Yixing Liu <liuyixing1@huawei.com> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -556,7 +556,7 @@ static int hns_roce_mmap(struct ib_ucontext *context,
|
||||
return -EINVAL;
|
||||
|
||||
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,
|
||||
to_hr_ucontext(context)->uar.pfn,
|
||||
PAGE_SIZE, vma->vm_page_prot))
|
||||
|
||||
Reference in New Issue
Block a user