From patchwork Thu Jan 12 19:07:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9514013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C8F3601E5 for ; Thu, 12 Jan 2017 19:10:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D26C286DB for ; Thu, 12 Jan 2017 19:10:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51E9028713; Thu, 12 Jan 2017 19:10:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,URIBL_BLACK autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C81E286DB for ; Thu, 12 Jan 2017 19:10:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750873AbdALTJq (ORCPT ); Thu, 12 Jan 2017 14:09:46 -0500 Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:63264 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751164AbdALTIm (ORCPT ); Thu, 12 Jan 2017 14:08:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uZBi4uZedRc1Jqcs8D6Zyd9dg5O/U6CCxG95KlHLut0=; b=nvDv0W1sFn+p4nE5CNh28qeR1MKWOsQYovsScu7/QpTjgmTaS9/pQBDjrg0rAD+aQCNEM/d5UB+ciC8eMizoHVlPIeOh69LkGGtBdeKZHpoN1KLj1Imc3IEv9dsUjBZzzE1tXzePh4Uj9PjIydoonV2VNJ5OD52NV3jiQoon3qM= Received: from CY1PR0201CA0039.namprd02.prod.outlook.com (10.163.30.177) by CO1PR02MB048.namprd02.prod.outlook.com (10.242.163.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Thu, 12 Jan 2017 19:08:08 +0000 Received: from BL2FFO11OLC002.protection.gbl (2a01:111:f400:7c09::101) by CY1PR0201CA0039.outlook.office365.com (2a01:111:e400:58b9::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Thu, 12 Jan 2017 19:08:09 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BL2FFO11OLC002.mail.protection.outlook.com (10.173.161.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Thu, 12 Jan 2017 19:08:07 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 04.A0.65426.B61D7785; Thu, 12 Jan 2017 10:56:43 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Thu, 12 Jan 2017 11:07:59 -0800 X-AuditID: 0ac94369-b62949800001ff92-f0-5877d16b0fa3 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 71.EF.09762.F04D7785; Thu, 12 Jan 2017 11:07:59 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , , "Greg Kroah-Hartman" , Bart Van Assche , Trond Myklebust , Anna Schumaker Subject: [PATCH v2 25/26] xprtrdma: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:17 -0800 Message-ID: <20170112190718.6728-26-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170112190718.6728-1-bart.vanassche@sandisk.com> References: <20170112190718.6728-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsXCddJ5kW72xfIIg69vRCz2no+0eHn+A6tF 8+L1bBaXd81hs3h2qJfF4sOeNhYHNo/9c9ewe8z49IXNY/5cOY/3+66yeXzeJBfAGsVlk5Ka k1mWWqRvl8CV8fawUsHT8op1i7MaGG8ldzFyckgImEjs7/7G3sXIxSEksJRJ4uvHaywQzjZG iRcPZrHBVC38f4sRxBYS2MgoMe9ODYjNJmAk8e39TBYQW0RATWLTq0Vgk5gFWpgk3uycwg6S EBZwltjW9hjMZhFQlZjeuJIJxOYVsJc4cvETI8QCeYldbRdZQWxOoPi3/5egltlJ7DrwH+wi CYFprBI37r1lgWgWlDg58wmYzSwgIXHwxQtmiAZ1iZNL5jNNYBSahaRsFpKyBYxMqxjFcjNz inPTUwsMTfWKE/NSMouz9ZLzczcxQkI+cwfj3SfehxgFOBiVeHh32JRFCLEmlhVX5h5ilOBg VhLhnXW+PEKINyWxsiq1KD++qDQntfgQozQHi5I4r9u9L2FCAumJJanZqakFqUUwWSYOTqkG xoMBr6Me9/UeFFBflTXv3KH+O5y+le+PJXEyO547s2vWQr0lW7a0N09Vr3MO+7Z1y9rjt52K rN9m7zh1n1Or3vHRjq29TOvfrSxuY2yQ6djblB3wz9if42FRV1x6vrRUSVnG+U2GR/9mNl2t fVN/ccbmE3ElDYa8h7LunFmotbhiuYuO2PaeSUosxRmJhlrMRcWJAHOm3YB1AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEJMWRmVeSWpSXmKPExsXCtZGTTZf/SnmEQe8Pfou95yMtDv5sY7R4 ef4Dq0Xz4vVsFpd3zWGzeHaol8Xiw542Fgd2j/1z17B7zPj0hc1j/lw5j/f7rrJ5TFtznsnj 8ya5ALYoLpuU1JzMstQifbsEroy3h5UKnpZXrFuc1cB4K7mLkZNDQsBEYuH/W4xdjFwcQgLr GSUmnlnGDpJgEzCS+PZ+JguILSKgJrHp1SJ2kCJmgRYmiaWPGplBEsICzhLb2h6DNbAIqEpM b1zJBGLzCthLvF90iglig7zErraLrCA2J1D82/9LjCC2kICdxK4D/1kmMHIvYGRYxSiWm5lT nJueWWBopFecmJeSWZytl5yfu4kREipROxivTzQ/xMjEwSnVwNi8apl5ZcwygUJnOwG5Kf7O 3pWyq7d0hhZp/eIq4ntVdyBp/YqdrEIPbfW11MrvX83fo72t67fElPuLJDTTj8u4+V3+tOjR 8rtFuyqiZJfElyWed3DZ0bm3Zo3ihp9f4iVKexfeYPaReyJd/CS+qEpyQfYa/XBn3xWZfziS V2yylRS7fvOKvxJLcUaioRZzUXEiAMwlCkXFAQAA MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(39850400002)(39860400002)(39410400002)(39840400002)(2980300002)(438002)(199003)(189002)(8676002)(92566002)(81166006)(68736007)(47776003)(50226002)(8936002)(81156014)(77096006)(38730400001)(106466001)(305945005)(69596002)(5003940100001)(50986999)(76176999)(5660300001)(626004)(189998001)(2950100002)(6916009)(110136003)(36756003)(6666003)(4326007)(33646002)(575784001)(2906002)(97736004)(48376002)(356003)(2270400002)(86362001)(50466002)(54906002)(1076002)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB048; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC002; 1:CVPgt/pQAalK8+SEEQuLqJnxb46xwaj+X/j/IYXa7fA6F7aiEFFogUS5FZGgEvXIKGCUtoUkzQyshLzDV8yQx1cyiTfty8Dg20w0L7Am+yPQFOEMk88daZaDg8QhYm3VwrHWmbPa0spjD3WIowyHdAsvwF1vURRj26pLYmUwO9RtYK6ZhlTOUbdQYd/QE3ymVz9yyY1Bp27jGY1SIVZFLZ77440iaPWQXQ031ei6N/psU8NpLTeItv5piaZU+xB2rMV7lKHscPijKJOUk1bIWWwdaVbRUxOx3l19yuniIpqKlhM1bDToqcvkYBP/1fPGGNie31y51mUdotraA4PUunrNKOfnLoZzsmfyOCYzPZDbamWkZVq2RocEKxGLrHTkie6Rt5Q+38s1vDaU2OyRI6xB+wfe7d0oaIR1990tgzRD8hnah5KR1wGcylS5EtoTEbwghLnLZwpzIS6EhYha9/nJzl3OxXeCivWqg9gY5+p10a4D7odt4DPCG/GtTetz X-MS-Office365-Filtering-Correlation-Id: 0a3d55d4-b6be-4b8f-6a4a-08d43b1e58b3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 3:fFUdmyQEhdCFAuLMNiDd6bkbvnqTkLm3k8g/ZH3Fb/nxkLzOJUM0rJPvu1fuX2+f0cZ5Wv2QLKJN9iXM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FLKL6YzOl0ng0c+ffUQnyqI4Exll4+wTI49FlO6qyeUhcgcI3vG/l/pU=; 20:odXD419Yn/ZzxcVQOHGuc5WyUt64QE4mBO99R6o7oM91DoV9vFyVjHZXWQ/Ic7Rk05YiHfx1x18ZktIQKjVvXeDWuKrSNP4hiCUXt28LaUa0Pu97wzJ4wO9mQWX+XvpUye6XNvVQy/qknHWky3VkEMf/YxOhBzJHUSorfkbW9/cR0DTf61m/LoJ3kKOKqA/UHyFrzAunLvBSls/tynbN/Z0SOqnqTp3x9dNEm1qEcK+ysFtC5nw2WE2Cgbi/M5F3lspmFdQFFEslRhx611ZznFuuJzk65XhU+2TtfYZUL9HuBIDZ89TUGgCu7RWIcMZpjMO1Z4PaYdU16XrLh4HV7f+/AzKqgO3LHcwdDCnvh+y4I7Ix+03+XEzOPhun/wJ1EL32W580ZghGKiZcR9z4ImrztWcPGVCm/rFbsjM5B9jiXa8WJkIrCeBThRO8ptXHaOvRTVCiiBNZDl+eG31e0yujObYdQVZoAIF1KNeNMKMvHxftVQs499ydu4gcHZGN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(235219596079481); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(10201501046)(3002001)(6055026)(2002001)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:CO1PR02MB048; BCL:0; PCL:0; RULEID:; SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 4:zzBUs9S5Q0hXRrtygsk2Im1xxuuX1HwlrSYP54+XkBom/1Fzo1pTW5JnGTiyQ98QbZNhk/llPXiL9fNUUogilFH346lCyeb93/flPa0VeWxiMwFDZ8ewCqzNA75ziZQRZsB1j4YKvx7LCyzGGA02PWFhs3ZOuA8m/5EfVNjkXeBBIqjbDnPBm5AZ/Ewpcigo3q1MuYa1d7ycuERUCcd5i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HI+Y6vWG0SB6ItMSxmMaX6Ckq+8wkzM0yl70Ex+RkpQNnZQCQru6LbjpcTHTqDACo6dpoV8qZPDqU90Bc/qqpFBZ5EoHZw1pOX1fdmPEsPqiIqSVvqabZJyyorwgqb3VZrrkc7J38BuKNsdKSDGwTEaVM5Rv0Ci0qy6SEJa64ZYJIZjYV1NHBoMwMv2uwA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:07.2758 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR02MB048 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Cc: Trond Myklebust Cc: Anna Schumaker Reviewed-by: Chuck Lever --- net/sunrpc/xprtrdma/fmr_ops.c | 12 ++++++------ net/sunrpc/xprtrdma/frwr_ops.c | 12 ++++++------ net/sunrpc/xprtrdma/rpc_rdma.c | 28 ++++++++++++++-------------- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 7 ++++--- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 20 +++++++++----------- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 26 ++++++++++++++------------ net/sunrpc/xprtrdma/svc_rdma_transport.c | 17 +++++++---------- net/sunrpc/xprtrdma/verbs.c | 18 ++++++++---------- 8 files changed, 68 insertions(+), 72 deletions(-) diff --git a/net/sunrpc/xprtrdma/fmr_ops.c b/net/sunrpc/xprtrdma/fmr_ops.c index 1ebb09e1ac4f..debc838e3a6a 100644 --- a/net/sunrpc/xprtrdma/fmr_ops.c +++ b/net/sunrpc/xprtrdma/fmr_ops.c @@ -136,8 +136,8 @@ fmr_op_recover_mr(struct rpcrdma_mw *mw) rc = __fmr_unmap(mw); /* ORDER: then DMA unmap */ - ib_dma_unmap_sg(r_xprt->rx_ia.ri_device, - mw->mw_sg, mw->mw_nents, mw->mw_dir); + dma_unmap_sg(r_xprt->rx_ia.ri_device->dma_device, mw->mw_sg, + mw->mw_nents, mw->mw_dir); if (rc) goto out_release; @@ -218,8 +218,8 @@ fmr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg, if (i == 0) goto out_dmamap_err; - if (!ib_dma_map_sg(r_xprt->rx_ia.ri_device, - mw->mw_sg, mw->mw_nents, mw->mw_dir)) + if (!dma_map_sg(r_xprt->rx_ia.ri_device->dma_device, mw->mw_sg, + mw->mw_nents, mw->mw_dir)) goto out_dmamap_err; for (i = 0, dma_pages = mw->fmr.fm_physaddrs; i < mw->mw_nents; i++) @@ -284,8 +284,8 @@ fmr_op_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req) list_for_each_entry_safe(mw, tmp, &req->rl_registered, mw_list) { list_del_init(&mw->mw_list); list_del_init(&mw->fmr.fm_mr->list); - ib_dma_unmap_sg(r_xprt->rx_ia.ri_device, - mw->mw_sg, mw->mw_nents, mw->mw_dir); + dma_unmap_sg(r_xprt->rx_ia.ri_device->dma_device, + mw->mw_sg, mw->mw_nents, mw->mw_dir); rpcrdma_put_mw(r_xprt, mw); } diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c index 47bed5333c7f..9b7c604669f9 100644 --- a/net/sunrpc/xprtrdma/frwr_ops.c +++ b/net/sunrpc/xprtrdma/frwr_ops.c @@ -182,8 +182,8 @@ frwr_op_recover_mr(struct rpcrdma_mw *mw) rc = __frwr_reset_mr(ia, mw); if (state != FRMR_FLUSHED_LI) - ib_dma_unmap_sg(ia->ri_device, - mw->mw_sg, mw->mw_nents, mw->mw_dir); + dma_unmap_sg(ia->ri_device->dma_device, mw->mw_sg, mw->mw_nents, + mw->mw_dir); if (rc) goto out_release; @@ -396,8 +396,8 @@ frwr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg, if (i == 0) goto out_dmamap_err; - dma_nents = ib_dma_map_sg(ia->ri_device, - mw->mw_sg, mw->mw_nents, mw->mw_dir); + dma_nents = dma_map_sg(ia->ri_device->dma_device, mw->mw_sg, + mw->mw_nents, mw->mw_dir); if (!dma_nents) goto out_dmamap_err; @@ -538,8 +538,8 @@ frwr_op_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req) dprintk("RPC: %s: DMA unmapping frmr %p\n", __func__, &mw->frmr); list_del_init(&mw->mw_list); - ib_dma_unmap_sg(ia->ri_device, - mw->mw_sg, mw->mw_nents, mw->mw_dir); + dma_unmap_sg(ia->ri_device->dma_device, mw->mw_sg, mw->mw_nents, + mw->mw_dir); rpcrdma_put_mw(r_xprt, mw); } return; diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index c52e0f2ffe52..6b6e700a5a68 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -476,8 +476,8 @@ rpcrdma_prepare_hdr_sge(struct rpcrdma_ia *ia, struct rpcrdma_req *req, } sge->length = len; - ib_dma_sync_single_for_device(ia->ri_device, sge->addr, - sge->length, DMA_TO_DEVICE); + dma_sync_single_for_device(ia->ri_device->dma_device, sge->addr, + sge->length, DMA_TO_DEVICE); req->rl_send_wr.num_sge++; return true; } @@ -505,8 +505,8 @@ rpcrdma_prepare_msg_sges(struct rpcrdma_ia *ia, struct rpcrdma_req *req, sge[sge_no].addr = rdmab_addr(rb); sge[sge_no].length = xdr->head[0].iov_len; sge[sge_no].lkey = rdmab_lkey(rb); - ib_dma_sync_single_for_device(device, sge[sge_no].addr, - sge[sge_no].length, DMA_TO_DEVICE); + dma_sync_single_for_device(device->dma_device, sge[sge_no].addr, + sge[sge_no].length, DMA_TO_DEVICE); /* If there is a Read chunk, the page list is being handled * via explicit RDMA, and thus is skipped here. However, the @@ -547,10 +547,11 @@ rpcrdma_prepare_msg_sges(struct rpcrdma_ia *ia, struct rpcrdma_req *req, goto out_mapping_overflow; len = min_t(u32, PAGE_SIZE - page_base, remaining); - sge[sge_no].addr = ib_dma_map_page(device, *ppages, - page_base, len, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(device, sge[sge_no].addr)) + sge[sge_no].addr = dma_map_page(device->dma_device, + *ppages, page_base, len, + DMA_TO_DEVICE); + if (dma_mapping_error(device->dma_device, + sge[sge_no].addr)) goto out_mapping_err; sge[sge_no].length = len; sge[sge_no].lkey = lkey; @@ -574,10 +575,9 @@ rpcrdma_prepare_msg_sges(struct rpcrdma_ia *ia, struct rpcrdma_req *req, map_tail: sge_no++; - sge[sge_no].addr = ib_dma_map_page(device, page, - page_base, len, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(device, sge[sge_no].addr)) + sge[sge_no].addr = dma_map_page(device->dma_device, page, + page_base, len, DMA_TO_DEVICE); + if (dma_mapping_error(device->dma_device, sge[sge_no].addr)) goto out_mapping_err; sge[sge_no].length = len; sge[sge_no].lkey = lkey; @@ -628,8 +628,8 @@ rpcrdma_unmap_sges(struct rpcrdma_ia *ia, struct rpcrdma_req *req) sge = &req->rl_send_sge[2]; for (count = req->rl_mapped_sges; count--; sge++) - ib_dma_unmap_page(device, sge->addr, sge->length, - DMA_TO_DEVICE); + dma_unmap_page(device->dma_device, sge->addr, sge->length, + DMA_TO_DEVICE); req->rl_mapped_sges = 0; } diff --git a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c index 288e35c2d8f4..d65abb351f5b 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c +++ b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c @@ -123,9 +123,10 @@ static int svc_rdma_bc_sendto(struct svcxprt_rdma *rdma, ctxt->sge[0].lkey = rdma->sc_pd->local_dma_lkey; ctxt->sge[0].length = sndbuf->len; ctxt->sge[0].addr = - ib_dma_map_page(rdma->sc_cm_id->device, ctxt->pages[0], 0, - sndbuf->len, DMA_TO_DEVICE); - if (ib_dma_mapping_error(rdma->sc_cm_id->device, ctxt->sge[0].addr)) { + dma_map_page(rdma->sc_cm_id->device->dma_device, ctxt->pages[0], 0, + sndbuf->len, DMA_TO_DEVICE); + if (dma_mapping_error(rdma->sc_cm_id->device->dma_device, + ctxt->sge[0].addr)) { ret = -EIO; goto out_unmap; } diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index 57d35fbb1c28..6ca1786c3493 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -151,12 +151,11 @@ int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt, rqstp->rq_respages = &rqstp->rq_arg.pages[pg_no+1]; rqstp->rq_next_page = rqstp->rq_respages + 1; ctxt->sge[pno].addr = - ib_dma_map_page(xprt->sc_cm_id->device, - head->arg.pages[pg_no], pg_off, - PAGE_SIZE - pg_off, - DMA_FROM_DEVICE); - ret = ib_dma_mapping_error(xprt->sc_cm_id->device, - ctxt->sge[pno].addr); + dma_map_page(xprt->sc_cm_id->device->dma_device, + head->arg.pages[pg_no], pg_off, + PAGE_SIZE - pg_off, DMA_FROM_DEVICE); + ret = dma_mapping_error(xprt->sc_cm_id->device->dma_device, + ctxt->sge[pno].addr); if (ret) goto err; svc_rdma_count_mappings(xprt, ctxt); @@ -271,9 +270,8 @@ int rdma_read_chunk_frmr(struct svcxprt_rdma *xprt, else clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); - dma_nents = ib_dma_map_sg(xprt->sc_cm_id->device, - frmr->sg, frmr->sg_nents, - frmr->direction); + dma_nents = dma_map_sg(xprt->sc_cm_id->device->dma_device, + frmr->sg, frmr->sg_nents, frmr->direction); if (!dma_nents) { pr_err("svcrdma: failed to dma map sg %p\n", frmr->sg); @@ -347,8 +345,8 @@ int rdma_read_chunk_frmr(struct svcxprt_rdma *xprt, atomic_inc(&rdma_stat_read); return ret; err: - ib_dma_unmap_sg(xprt->sc_cm_id->device, - frmr->sg, frmr->sg_nents, frmr->direction); + dma_unmap_sg(xprt->sc_cm_id->device->dma_device, frmr->sg, + frmr->sg_nents, frmr->direction); svc_rdma_put_context(ctxt, 0); svc_rdma_put_frmr(xprt, frmr); return ret; diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index ad4d286a83c5..5fa33ad92484 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c @@ -148,8 +148,8 @@ static dma_addr_t dma_map_xdr(struct svcxprt_rdma *xprt, page = virt_to_page(xdr->tail[0].iov_base); } } - dma_addr = ib_dma_map_page(xprt->sc_cm_id->device, page, xdr_off, - min_t(size_t, PAGE_SIZE, len), dir); + dma_addr = dma_map_page(xprt->sc_cm_id->device->dma_device, page, + xdr_off, min_t(size_t, PAGE_SIZE, len), dir); return dma_addr; } @@ -269,8 +269,8 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp, dma_map_xdr(xprt, &rqstp->rq_res, xdr_off, sge_bytes, DMA_TO_DEVICE); xdr_off += sge_bytes; - if (ib_dma_mapping_error(xprt->sc_cm_id->device, - sge[sge_no].addr)) + if (dma_mapping_error(xprt->sc_cm_id->device->dma_device, + sge[sge_no].addr)) goto err; svc_rdma_count_mappings(xprt, ctxt); sge[sge_no].lkey = xprt->sc_pd->local_dma_lkey; @@ -478,9 +478,10 @@ static int send_reply(struct svcxprt_rdma *rdma, ctxt->sge[0].lkey = rdma->sc_pd->local_dma_lkey; ctxt->sge[0].length = svc_rdma_xdr_get_reply_hdr_len(rdma_resp); ctxt->sge[0].addr = - ib_dma_map_page(rdma->sc_cm_id->device, page, 0, - ctxt->sge[0].length, DMA_TO_DEVICE); - if (ib_dma_mapping_error(rdma->sc_cm_id->device, ctxt->sge[0].addr)) + dma_map_page(rdma->sc_cm_id->device->dma_device, page, 0, + ctxt->sge[0].length, DMA_TO_DEVICE); + if (dma_mapping_error(rdma->sc_cm_id->device->dma_device, + ctxt->sge[0].addr)) goto err; svc_rdma_count_mappings(rdma, ctxt); @@ -495,8 +496,8 @@ static int send_reply(struct svcxprt_rdma *rdma, dma_map_xdr(rdma, &rqstp->rq_res, xdr_off, sge_bytes, DMA_TO_DEVICE); xdr_off += sge_bytes; - if (ib_dma_mapping_error(rdma->sc_cm_id->device, - ctxt->sge[sge_no].addr)) + if (dma_mapping_error(rdma->sc_cm_id->device->dma_device, + ctxt->sge[sge_no].addr)) goto err; svc_rdma_count_mappings(rdma, ctxt); ctxt->sge[sge_no].lkey = rdma->sc_pd->local_dma_lkey; @@ -677,9 +678,10 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, /* Prepare SGE for local address */ ctxt->sge[0].lkey = xprt->sc_pd->local_dma_lkey; ctxt->sge[0].length = length; - ctxt->sge[0].addr = ib_dma_map_page(xprt->sc_cm_id->device, - p, 0, length, DMA_TO_DEVICE); - if (ib_dma_mapping_error(xprt->sc_cm_id->device, ctxt->sge[0].addr)) { + ctxt->sge[0].addr = dma_map_page(xprt->sc_cm_id->device->dma_device, + p, 0, length, DMA_TO_DEVICE); + if (dma_mapping_error(xprt->sc_cm_id->device->dma_device, + ctxt->sge[0].addr)) { dprintk("svcrdma: Error mapping buffer for protocol error\n"); svc_rdma_put_context(ctxt, 1); return; diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index ca2799af05a6..ed19de5c9a34 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -237,10 +237,8 @@ void svc_rdma_unmap_dma(struct svc_rdma_op_ctxt *ctxt) * last WR that uses it completes. */ if (ctxt->sge[i].lkey == lkey) - ib_dma_unmap_page(device, - ctxt->sge[i].addr, - ctxt->sge[i].length, - ctxt->direction); + dma_unmap_page(device->dma_device, ctxt->sge[i].addr, + ctxt->sge[i].length, ctxt->direction); } ctxt->mapped_sges = 0; } @@ -600,10 +598,9 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt, gfp_t flags) if (!page) goto err_put_ctxt; ctxt->pages[sge_no] = page; - pa = ib_dma_map_page(xprt->sc_cm_id->device, - page, 0, PAGE_SIZE, - DMA_FROM_DEVICE); - if (ib_dma_mapping_error(xprt->sc_cm_id->device, pa)) + pa = dma_map_page(xprt->sc_cm_id->device->dma_device, + page, 0, PAGE_SIZE, DMA_FROM_DEVICE); + if (dma_mapping_error(xprt->sc_cm_id->device->dma_device, pa)) goto err_put_ctxt; svc_rdma_count_mappings(xprt, ctxt); ctxt->sge[sge_no].addr = pa; @@ -941,8 +938,8 @@ void svc_rdma_put_frmr(struct svcxprt_rdma *rdma, struct svc_rdma_fastreg_mr *frmr) { if (frmr) { - ib_dma_unmap_sg(rdma->sc_cm_id->device, - frmr->sg, frmr->sg_nents, frmr->direction); + dma_unmap_sg(rdma->sc_cm_id->device->dma_device, frmr->sg, + frmr->sg_nents, frmr->direction); spin_lock_bh(&rdma->sc_frmr_q_lock); WARN_ON_ONCE(!list_empty(&frmr->frmr_list)); list_add(&frmr->frmr_list, &rdma->sc_frmr_q); diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 11d07748f699..ba15926173e5 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -179,9 +179,9 @@ rpcrdma_wc_receive(struct ib_cq *cq, struct ib_wc *wc) rep->rr_wc_flags = wc->wc_flags; rep->rr_inv_rkey = wc->ex.invalidate_rkey; - ib_dma_sync_single_for_cpu(rep->rr_device, - rdmab_addr(rep->rr_rdmabuf), - rep->rr_len, DMA_FROM_DEVICE); + dma_sync_single_for_cpu(rep->rr_device->dma_device, + rdmab_addr(rep->rr_rdmabuf), + rep->rr_len, DMA_FROM_DEVICE); rpcrdma_update_granted_credits(rep); @@ -1259,11 +1259,9 @@ __rpcrdma_dma_map_regbuf(struct rpcrdma_ia *ia, struct rpcrdma_regbuf *rb) if (rb->rg_direction == DMA_NONE) return false; - rb->rg_iov.addr = ib_dma_map_single(ia->ri_device, - (void *)rb->rg_base, - rdmab_length(rb), - rb->rg_direction); - if (ib_dma_mapping_error(ia->ri_device, rdmab_addr(rb))) + rb->rg_iov.addr = dma_map_single(ia->ri_device->dma_device, rb->rg_base, + rdmab_length(rb), rb->rg_direction); + if (dma_mapping_error(ia->ri_device->dma_device, rdmab_addr(rb))) return false; rb->rg_device = ia->ri_device; @@ -1277,8 +1275,8 @@ rpcrdma_dma_unmap_regbuf(struct rpcrdma_regbuf *rb) if (!rpcrdma_regbuf_is_mapped(rb)) return; - ib_dma_unmap_single(rb->rg_device, rdmab_addr(rb), - rdmab_length(rb), rb->rg_direction); + dma_unmap_single(rb->rg_device->dma_device, rdmab_addr(rb), + rdmab_length(rb), rb->rg_direction); rb->rg_device = NULL; }