]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Get rid of page operation after dma_alloc_coherent
authorWei Hu\(Xavier\) <xavier.huwei@huawei.com>
Tue, 28 Nov 2017 07:10:28 +0000 (15:10 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 1 Dec 2017 19:21:27 +0000 (12:21 -0700)
commitc298b1077c353bb0fbd7f4429d443c6bda3463aa
tree47926cc1ac1285b1cff4d1f66d75e4d5c902a5ca
parent9814ce0e0506ac8aee595decfb00f0b8863b4c80
RDMA/hns: Get rid of page operation after dma_alloc_coherent

In general, dma_alloc_coherent() returns a CPU virtual address and
a DMA address, and we have no guarantee that the underlying memory
even has an associated struct page at all.

This patch gets rid of the page operation after dma_alloc_coherent,
and records the VA returned form dma_alloc_coherent in the struct
of hem in hns RoCE driver.

Fixes: 87c28d1("IB/hns: Add driver files for hns RoCE driver")
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Xiping Zhang (Francis) <zhangxiping3@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hem.c
drivers/infiniband/hw/hns/hns_roce_hem.h