lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170112190718.6728-24-bart.vanassche@sandisk.com>
Date:   Thu, 12 Jan 2017 11:07:15 -0800
From:   Bart Van Assche <bart.vanassche@...disk.com>
To:     Doug Ledford <dledford@...hat.com>
CC:     <linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        Bart Van Assche <bart.vanassche@...disk.com>,
        Eric Van Hensbergen <ericvh@...il.com>
Subject: [PATCH v2 23/26] net/9p: Inline ib_dma_map_*() functions

Signed-off-by: Bart Van Assche <bart.vanassche@...disk.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Reviewed-by: Sagi Grimberg <sagi@...mberg.me>
Cc: Eric Van Hensbergen <ericvh@...il.com>
---
 net/9p/trans_rdma.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index 553ed4ecb6a0..b49d5998289e 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -294,8 +294,8 @@ recv_done(struct ib_cq *cq, struct ib_wc *wc)
 	int16_t tag;
 
 	req = NULL;
-	ib_dma_unmap_single(rdma->cm_id->device, c->busa, client->msize,
-							 DMA_FROM_DEVICE);
+	dma_unmap_single(rdma->cm_id->device->dma_device, c->busa,
+			 client->msize, DMA_FROM_DEVICE);
 
 	if (wc->status != IB_WC_SUCCESS)
 		goto err_out;
@@ -339,9 +339,8 @@ send_done(struct ib_cq *cq, struct ib_wc *wc)
 	struct p9_rdma_context *c =
 		container_of(wc->wr_cqe, struct p9_rdma_context, cqe);
 
-	ib_dma_unmap_single(rdma->cm_id->device,
-			    c->busa, c->req->tc->size,
-			    DMA_TO_DEVICE);
+	dma_unmap_single(rdma->cm_id->device->dma_device, c->busa,
+			 c->req->tc->size, DMA_TO_DEVICE);
 	up(&rdma->sq_sem);
 	kfree(c);
 }
@@ -379,10 +378,9 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c)
 	struct ib_recv_wr wr, *bad_wr;
 	struct ib_sge sge;
 
-	c->busa = ib_dma_map_single(rdma->cm_id->device,
-				    c->rc->sdata, client->msize,
-				    DMA_FROM_DEVICE);
-	if (ib_dma_mapping_error(rdma->cm_id->device, c->busa))
+	c->busa = dma_map_single(rdma->cm_id->device->dma_device, c->rc->sdata,
+				 client->msize, DMA_FROM_DEVICE);
+	if (dma_mapping_error(rdma->cm_id->device->dma_device, c->busa))
 		goto error;
 
 	c->cqe.done = recv_done;
@@ -469,10 +467,10 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
 	}
 	c->req = req;
 
-	c->busa = ib_dma_map_single(rdma->cm_id->device,
-				    c->req->tc->sdata, c->req->tc->size,
-				    DMA_TO_DEVICE);
-	if (ib_dma_mapping_error(rdma->cm_id->device, c->busa)) {
+	c->busa = dma_map_single(rdma->cm_id->device->dma_device,
+				 c->req->tc->sdata, c->req->tc->size,
+				 DMA_TO_DEVICE);
+	if (dma_mapping_error(rdma->cm_id->device->dma_device, c->busa)) {
 		err = -EIO;
 		goto send_error;
 	}
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ