]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
RDMA/hns: Modify the mapping attribute of doorbell to device
authorYixing Liu <liuyixing1@huawei.com>
Mon, 6 Dec 2021 13:36:52 +0000 (21:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:04:32 +0000 (09:04 +0100)
commit 39d5534b1302189c809e90641ffae8cbdc42a8fc upstream.

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

Fixes: 9a4435375cd1 ("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>
drivers/infiniband/hw/hns/hns_roce_main.c

index 5e60a2596d2bf171946f6a856a7178b4603899eb..456c622d7c5c978284880b05580a5345420048b0 100644 (file)
@@ -432,7 +432,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))