[PATCH 2/3] RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent

2017-11-26 Thread Wei Hu (Xavier)
In general dma_alloc_coherent() return a CPU virtual address and a DMA address, and we have no guarantee that the virtual address is either in the linear map or vmalloc, and not some other special place. we have no guarantee that the underlying memory even has an associated struct page at all. In

[PATCH 2/3] RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent

2017-11-26 Thread Wei Hu (Xavier)
In general dma_alloc_coherent() return a CPU virtual address and a DMA address, and we have no guarantee that the virtual address is either in the linear map or vmalloc, and not some other special place. we have no guarantee that the underlying memory even has an associated struct page at all. In