Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Wenpeng Liang <liangwenpeng@huawei.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH for-next] RDMA/hns: Modify the mapping attribute of doorbell to device
Date: Mon, 6 Dec 2021 11:37:43 -0400	[thread overview]
Message-ID: <20211206153743.GI4670@nvidia.com> (raw)
In-Reply-To: <20211206133652.27476-1-liangwenpeng@huawei.com>

On Mon, Dec 06, 2021 at 09:36:52PM +0800, Wenpeng Liang wrote:
> From: Yixing Liu <liuyixing1@huawei.com>
> 
> 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@huawei.com>
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> ---
>  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

  reply	other threads:[~2021-12-06 15:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 13:36 [PATCH for-next] RDMA/hns: Modify the mapping attribute of doorbell to device Wenpeng Liang
2021-12-06 15:37 ` Jason Gunthorpe [this message]
2021-12-07 12:51   ` Wenpeng Liang
2021-12-06 23:52 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211206153743.GI4670@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox