Re: [PATCH for-next] RDMA/hns: Modify the mapping attribute of doorbell to device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021/12/6 23:37, Jason Gunthorpe wrote:
> On Mon, Dec 06, 2021 at 09:36:52PM +0800, Wenpeng Liang wrote:
>> From: Yixing Liu <liuyixing1@xxxxxxxxxx>
>>
>> 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")
>> Signed-off-by: Yixing Liu <liuyixing1@xxxxxxxxxx>
>> Signed-off-by: Wenpeng Liang <liangwenpeng@xxxxxxxxxx>
>> ---
>>  drivers/infiniband/hw/hns/hns_roce_main.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> It seems like the right thing todo, thanks
> 
> I see other drivers are doing it wrong as well:
> 
> drivers/infiniband/hw/bnxt_re/ib_verbs.c:               vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/cxgb4/provider.c:         vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/cxgb4/provider.c:                                 pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/cxgb4/t4.h:       return pgprot_noncached(prot);
> drivers/infiniband/hw/efa/efa_verbs.c:                                  pgprot_noncached(vma->vm_page_prot),
> drivers/infiniband/hw/hfi1/file_ops.c:          /* vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); */
> drivers/infiniband/hw/hfi1/file_ops.c:          vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/hns/hns_roce_main.c:              prot = pgprot_noncached(prot);
> drivers/infiniband/hw/irdma/verbs.c:                             pgprot_noncached(vma->vm_page_prot), NULL);
> drivers/infiniband/hw/irdma/verbs.c:                                    pgprot_noncached(vma->vm_page_prot),
> drivers/infiniband/hw/mlx4/main.c:                                       pgprot_noncached(vma->vm_page_prot),
> drivers/infiniband/hw/mlx4/main.c:                      PAGE_SIZE, pgprot_noncached(vma->vm_page_prot),
> drivers/infiniband/hw/mlx5/main.c:              prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/mlx5/main.c:              prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/mlx5/main.c:                                       pgprot_noncached(vma->vm_page_prot),
> drivers/infiniband/hw/mthca/mthca_provider.c:   vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:            vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/qib/qib_file_ops.c:               vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/qib/qib_file_ops.c:       vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c:   vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c:        vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> 
> They should all use pgprot_device I think?
> 
> It is the same except on ARM where pgprot_device() is a bit faster
> 
> Jason
> .
> 

I will submit a patch to fix these problems later.

Thanks
Wenpeng



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux