From patchwork Thu Jan 12 19:07:06 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: 9514057 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 B9BBD601E7 for ; Thu, 12 Jan 2017 19:12:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAA9F284C3 for ; Thu, 12 Jan 2017 19:12:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F84028522; Thu, 12 Jan 2017 19:12:54 +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 D3701284C3 for ; Thu, 12 Jan 2017 19:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbdALTLW (ORCPT ); Thu, 12 Jan 2017 14:11:22 -0500 Received: from mail-cys01nam02on0068.outbound.protection.outlook.com ([104.47.37.68]:59424 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750803AbdALTI1 (ORCPT ); Thu, 12 Jan 2017 14:08:27 -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=A1vIRiX5qCDsT7E29kUPbYtA2Q433bBUKs7dNAz1/Xk=; b=Fq3u8iKDdAUe1vpyyK9wxerEs7k5ArCHLP94BbyBzP3vWIwch9nNOcmDcZxryHECUmN4MT6hZABgXE7alWEyyrqHAJDu52aDMxIIFwELkkl4E7M6KZh1WA1kQ5ZE7pEq+XN5scqq7SJK8yzUgBKoGTzrsd+YzDA7BtD8lh9lVWg= Received: from BLUPR0201CA0021.namprd02.prod.outlook.com (10.163.116.31) by BN1PR02MB037.namprd02.prod.outlook.com (10.242.210.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Thu, 12 Jan 2017 19:08:09 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::147) by BLUPR0201CA0021.outlook.office365.com (2a01:111:e400:52e7::31) 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 BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) 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:08 +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 31.A0.65426.961D7785; Thu, 12 Jan 2017 10:56:41 -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:58 -0800 X-AuditID: 0ac94369-b62949800001ff92-e9-5877d169f3a8 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id EC.DF.09762.E04D7785; Thu, 12 Jan 2017 11:07:58 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , , "Greg Kroah-Hartman" , Bart Van Assche Subject: [PATCH v2 14/26] IB/mlx4: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:06 -0800 Message-ID: <20170112190718.6728-15-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+NgFrrILMWRmVeSWpSXmKPExsXCddJ5kW7mxfIIg/ZXihYvz39gtWhevJ7N 4vKuOWwWzw71sjiweOyfu4bd4/2+q2wenzfJBTBHcdmkpOZklqUW6dslcGX8mhFTsCms4u2S t2wNjFvcuxg5OSQETCR65q5k6mLk4hASWMoksW3RfChnG6NET9dpRpiqvnenmSESGxklPj+b wgaSYBMwkvj2fiYLiC0ioCax6dUidpAiZoHFjBLtp5cxgySEBZwk1mxvBUpwcLAIqErMueQM EuYVsJd4fuAQG8QCeYldbRdZQWxOoPi3/5fAFgsJ2EnsOvCfBWSmhMA/FolFKxewQjQLSpyc +QRsMbOAhMTBFy+YIRrUJU4umc80gVFoFpKyWUjKFjAyrWIUy83MKc5NTy0wNNUrTsxLySzO 1kvOz93ECAnozB2Md594H2IU4GBU4uHdYVMWIcSaWFZcmXuIUYKDWUmEd9b58ggh3pTEyqrU ovz4otKc1OJDjNIcLErivG73voQJCaQnlqRmp6YWpBbBZJk4OKUaGAOMc6Y4bzr7YsLiNSFn 1Y+37TrnPM9e2d5M/tOS3Q8f2e95/dT86fdT/kcMXsw5nC1aorzU0epu1cu4ZX+sD7jy87+o W2Nmzbafg6HWSCJJSmdDNvPtfccbtt5z7VM+dOTm3uT1X0O6tZYUpn2dq5NiobHC2H9K52+e 79w8PfYBH7d+XXJU8KkSS3FGoqEWc1FxIgBW1C3OZAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPJMWRmVeSWpSXmKPExsXCtZGTTZfvSnmEwf6PehYHf7YxWrw8/4HV onnxejaLy7vmsFk8O9TL4sDqsX/uGnaP9/uusnlMW3OeyePzJrkAligum5TUnMyy1CJ9uwSu jF8zYgo2hVW8XfKWrYFxi3sXIyeHhICJRN+708xdjFwcQgLrGSXWz53ODpJgEzCS+PZ+JguI LSKgJrHp1SKwOLPAQkaJib+kQGxhASeJNdtbgeIcHCwCqhJzLjmDhHkF7CUunVvDCDFfXmJX 20VWEJsTKP7t/yWwuJCAncSuA/9ZJjByL2BkWMUolpuZU5ybnllgaKRXnJiXklmcrZecn7uJ ERIEUTsYr080P8TIxMEp1cDIeflzsJ6yc3qFF4/Y1tByh9j9tbrSKn82SVdG9b7ae/71r3e/ 5q1fsauVxaFglfLssLf3xf+obzA11n3x/2el750Q47qzJtPXJDz0zPm52ORe9uIDbSKBvBFb GrwmSU/J2+Fs/f2DENvJPmGesL/Jx0+e8Lh0Y/auAKtDYUtOCa6bUCt+TKxXiaU4I9FQi7mo OBEAPUQZN7IBAAA= 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)(39860400002)(39850400002)(39410400002)(39450400003)(39840400002)(2980300002)(438002)(199003)(189002)(110136003)(106466001)(1076002)(92566002)(54906002)(97736004)(626004)(50986999)(76176999)(33646002)(38730400001)(77096006)(4001430100002)(81156014)(47776003)(305945005)(8676002)(5660300001)(81166006)(48376002)(189998001)(69596002)(50466002)(2906002)(86362001)(4326007)(356003)(575784001)(6916009)(2950100002)(6666003)(36756003)(68736007)(107886002)(551934003)(5003940100001)(8936002)(2270400002)(50226002)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR02MB037; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD022; 1:e5klvH63mn09iJay6EaQ90l7wPa2DcEYrRlH0SHRpuh/bCWJ+FnPMpLOnEZfmYPQUOYrG915PuGqajXrysEf8myWNwtwyyBocqxKl2wqX2yIqi6NfgbEfXEDlN4jm+O3k4VG5fgDGa420Jv+1aMyUMEW0LBYdlOAcnUvk+QnrvsGo9rs6QmGw/EoYK8k6wOBN1XtnFhkamTcVujGYffhNEtRnWY+y8qAAf1kG6cpu7fzK/LRQYanggDkYT1A9487TlebaCxO0O+XAFhjKFT/aV4KqFMGTXE4R6uOOgvcJS4tHkWzZFWYmAG7zCQt/BQQsjnGhIUFx7RBdpWxYEENLAvySJWi/LC2dkmFNgErUjpK/Qfwm5PHX+HjomrSfwr6MXaBSOrBW34B4vBGDphf0IkB+ANAB82JJXo1SOhuNoBz9OA2N6m2ME5lQSVMTkoZou3LFUGgwZDtdDVffYO5hxjI4BI3QwEW+gWoIIOY9NW8/e5HMcZamBcAsMQx0xKt X-MS-Office365-Filtering-Correlation-Id: 13b5e339-77d7-4d44-d68e-08d43b1e58bd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BN1PR02MB037; X-Microsoft-Exchange-Diagnostics: 1; BN1PR02MB037; 3:W14VnxTYtEVOdX1zCxD/Nt+KzmdhYSMA6hUPZYnaFfasJiqzOA1x9ygri0Fey0RxrecZ12zwNxScyuk2AEuh3fWzkLgcoBfMFc33qD9Z2agEZNjXjLcohqB31TGsI9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nphtJVgvau4HQxLtEeEF5a0D4psYpnzZSWmbUgJkCkBWlAL7UZ12bIT8HU4JNQawBdVm0wutyUNTFegNR863ud9l10T7B2ZEDZpSwNiAWQrS667ROBlhNqIxFg1k+YVgQFEfO9lAg1lUh2Y/UempbG4i/7CP0+BN+8sz6j1pP8YJZJRYxXVrlo4MZUai65hz3Ztsrbk+D5J5MJZC1lNSr9OltD3RsThXVKT1qqXV6lQeUadQqBjXI1dU198EolcqSKh/Xvj61mKfsJr+B4jo9OAZiC0hHjqlU2mnJyCzaXuQH5zLspAS1xt0VjuT5b52iD5A6Xa/3f03NVq2vlWpuA3V4ulbHwI2HZ0JkDjbfL2qlvl7LXaWkWcSz751kIoGbGeZV5m/g2YbKIndzc9Q36JM/gcQxaXFmZKYsrm0JM2Zm06NzNjsBs8/vuPQcKgtyoyiDzfT/4ssvnouV9FvK/apo2wXDU6Viot3KABicLUKJ/DMAKgLK5WTBeHuAzYq 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)(13018025)(5005006)(13016025)(8121501046)(3002001)(10201501046)(6055026)(2002001)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(20161123558021)(6072148); SRVR:BN1PR02MB037; BCL:0; PCL:0; RULEID:; SRVR:BN1PR02MB037; X-Microsoft-Exchange-Diagnostics: 1; BN1PR02MB037; 4:hPEeFG6EH2Wvl0iEg4V/7e4WWJQqh25zhXcAdb3A7F72cQv+hh9zlmO7bb2aNesqcx9ddtGYCkd/YVoUv/m3U4LEDjaiHrvBq5T7N1B3KzoVLGDVHk+ejRYsTrDT+dx5hsDsyvQZAoPc/xcCgRElaDBYZlGnLZw5i39RW4VdQalF9l7c5HDQEZxy61GTKBHzG3g3qd8Zu1b+ZUA0/1KLfGSw9DCqGBpZVpsTat5OU7NerXyfvxnZR5MjSBSJJ0E9yiBCjub/EE7MDE/B2iqsUmr2ztaENKfTD8hyPZ8hehd/9JZ0ehEfK+namRjYxcu7e+KiXPVwko3azPtSVxlNIt7JTle4YpVDqPR9x5Mq1oeQizw9Fv5sIZKVcVtrokZsNrXUFNgCuPadgnUM0+0pNhwqZ7UTvxtcCFrpjtedAhUwb4/l2OvhX9RL4GUCFddcVcvL8R1kpmQS1YG7qDm43Kko6lmoODtHG9jwnVJRtDndmrrYBdaI+bdjmfsoqLi/apRLCry2k6eR6Sk4r3xCui9x4UpY9PKy6qUjnv5L122ALUiu5AWPI8yuF74dk3BjQZ76AIFZQnEYfVt6gKxxx7v4nVVRyDE915VJcFtpVQ5YOFjMmD/6V69SqA8FT69TbDyp92K0jHidZGmesoNJJkJliyNLUz3UkeucWIYIr1mzRgnzfCCdRYJOZEDgQXn/5p5Y782ONLHlWKOJAV85IBpjvXIRHV1V4GC9iVL+te6UjYVjIGxsSYlk52Ue7ntk X-Forefront-PRVS: 018577E36E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR02MB037; 23:KboF/TdSAJhhhe606T48TONWWFKNFQyOMqhIYf05eF?= =?us-ascii?Q?8beFOfzOzDs5FdG83dg7jIg6DCUW+9qVblH2rNWCewF7aU4FE5M+ZTcu1Sld?= =?us-ascii?Q?NBBgQt95d09pYsZmmbjgfVl+81tyGRatrw58+tuCHcBfzPrmdzg35+eY0m+I?= =?us-ascii?Q?mtWiULyBlsErjhYAk21TkQbA7L/roaENY+rvVmuMIPF3U/xwIFdcs6SaTgWo?= =?us-ascii?Q?BigBfGb3gqBx8WrGR8ldDM7NvBjspzYXR1GY+FKzRsx60eUwgLouZ4dxlT4C?= =?us-ascii?Q?n9RZzg6WlrMQyQlmwRsM0924I3BJERnUKf7Tw4b6owmTBXVBZRUFqACigGXZ?= =?us-ascii?Q?YDnC9aUaKKBdqAEx5n8TjUkwvdrMKtHtGEGpzuO3LJ4MYtfQEfiA7ykO2eBI?= =?us-ascii?Q?Nx6xpzLr7+v4Ny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r2JN+ST6CN5jYUDDfIjqcmywFcd/4PyxeYpHGKhxfuJfqK0U7bQWPddKHXHj54v6/CQE96jmo3KaEVAo6+/mTzvnjwFLoS/EmHKlXFyIc+0g6j1zUD51EAU1FDGaefnTI/+kIjGML/y1ViZsc+FCLYWiG4LKeRCPvBf45h2wnY2PB5gZ/oqkeXXyn7+GFP+T/pUc8WaVv9YPnihLRBz+clhOA3OWIxJAdzGb0y3ZfMvub/A== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:08.0460 (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: BN1PR02MB037 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 Acked-by: Leon Romanovsky --- drivers/infiniband/hw/mlx4/cq.c | 8 ++-- drivers/infiniband/hw/mlx4/mad.c | 79 ++++++++++++++++++++-------------------- drivers/infiniband/hw/mlx4/mr.c | 8 ++-- drivers/infiniband/hw/mlx4/qp.c | 29 ++++++++------- 4 files changed, 63 insertions(+), 61 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index 6a0fec357dae..22b88c10e86d 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c @@ -584,10 +584,10 @@ static void use_tunnel_data(struct mlx4_ib_qp *qp, struct mlx4_ib_cq *cq, struct { struct mlx4_ib_proxy_sqp_hdr *hdr; - ib_dma_sync_single_for_cpu(qp->ibqp.device, - qp->sqp_proxy_rcv[tail].map, - sizeof (struct mlx4_ib_proxy_sqp_hdr), - DMA_FROM_DEVICE); + dma_sync_single_for_cpu(qp->ibqp.device->dma_device, + qp->sqp_proxy_rcv[tail].map, + sizeof(struct mlx4_ib_proxy_sqp_hdr), + DMA_FROM_DEVICE); hdr = (struct mlx4_ib_proxy_sqp_hdr *) (qp->sqp_proxy_rcv[tail].addr); wc->pkey_index = be16_to_cpu(hdr->tun.pkey_index); wc->src_qp = be32_to_cpu(hdr->tun.flags_src_qp) & 0xFFFFFF; diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index db564ccc0f92..b23a29bb29e9 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -582,10 +582,10 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port, if (tun_qp->tx_ring[tun_tx_ix].ah) ib_destroy_ah(tun_qp->tx_ring[tun_tx_ix].ah); tun_qp->tx_ring[tun_tx_ix].ah = ah; - ib_dma_sync_single_for_cpu(&dev->ib_dev, - tun_qp->tx_ring[tun_tx_ix].buf.map, - sizeof (struct mlx4_rcv_tunnel_mad), - DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->ib_dev.dma_device, + tun_qp->tx_ring[tun_tx_ix].buf.map, + sizeof(struct mlx4_rcv_tunnel_mad), + DMA_TO_DEVICE); /* copy over to tunnel buffer */ if (grh) @@ -624,10 +624,10 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port, tun_mad->hdr.slid_mac_47_32 = cpu_to_be16(wc->slid); } - ib_dma_sync_single_for_device(&dev->ib_dev, - tun_qp->tx_ring[tun_tx_ix].buf.map, - sizeof (struct mlx4_rcv_tunnel_mad), - DMA_TO_DEVICE); + dma_sync_single_for_device(dev->ib_dev.dma_device, + tun_qp->tx_ring[tun_tx_ix].buf.map, + sizeof(struct mlx4_rcv_tunnel_mad), + DMA_TO_DEVICE); list.addr = tun_qp->tx_ring[tun_tx_ix].buf.map; list.length = sizeof (struct mlx4_rcv_tunnel_mad); @@ -1321,8 +1321,8 @@ static int mlx4_ib_post_pv_qp_buf(struct mlx4_ib_demux_pv_ctx *ctx, recv_wr.num_sge = 1; recv_wr.wr_id = (u64) index | MLX4_TUN_WRID_RECV | MLX4_TUN_SET_WRID_QPN(tun_qp->proxy_qpt); - ib_dma_sync_single_for_device(ctx->ib_dev, tun_qp->ring[index].map, - size, DMA_FROM_DEVICE); + dma_sync_single_for_device(ctx->ib_dev->dma_device, tun_qp->ring[index].map, + size, DMA_FROM_DEVICE); return ib_post_recv(tun_qp->qp, &recv_wr, &bad_recv_wr); } @@ -1412,17 +1412,17 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, if (sqp->tx_ring[wire_tx_ix].ah) ib_destroy_ah(sqp->tx_ring[wire_tx_ix].ah); sqp->tx_ring[wire_tx_ix].ah = ah; - ib_dma_sync_single_for_cpu(&dev->ib_dev, - sqp->tx_ring[wire_tx_ix].buf.map, - sizeof (struct mlx4_mad_snd_buf), - DMA_TO_DEVICE); + dma_sync_single_for_cpu(dev->ib_dev.dma_device, + sqp->tx_ring[wire_tx_ix].buf.map, + sizeof(struct mlx4_mad_snd_buf), + DMA_TO_DEVICE); memcpy(&sqp_mad->payload, mad, sizeof *mad); - ib_dma_sync_single_for_device(&dev->ib_dev, - sqp->tx_ring[wire_tx_ix].buf.map, - sizeof (struct mlx4_mad_snd_buf), - DMA_TO_DEVICE); + dma_sync_single_for_device(dev->ib_dev.dma_device, + sqp->tx_ring[wire_tx_ix].buf.map, + sizeof(struct mlx4_mad_snd_buf), + DMA_TO_DEVICE); list.addr = sqp->tx_ring[wire_tx_ix].buf.map; list.length = sizeof (struct mlx4_mad_snd_buf); @@ -1504,9 +1504,10 @@ static void mlx4_ib_multiplex_mad(struct mlx4_ib_demux_pv_ctx *ctx, struct ib_wc } /* Map transaction ID */ - ib_dma_sync_single_for_cpu(ctx->ib_dev, tun_qp->ring[wr_ix].map, - sizeof (struct mlx4_tunnel_mad), - DMA_FROM_DEVICE); + dma_sync_single_for_cpu(ctx->ib_dev->dma_device, + tun_qp->ring[wr_ix].map, + sizeof(struct mlx4_tunnel_mad), + DMA_FROM_DEVICE); switch (tunnel->mad.mad_hdr.method) { case IB_MGMT_METHOD_SET: case IB_MGMT_METHOD_GET: @@ -1627,11 +1628,11 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx, tun_qp->ring[i].addr = kmalloc(rx_buf_size, GFP_KERNEL); if (!tun_qp->ring[i].addr) goto err; - tun_qp->ring[i].map = ib_dma_map_single(ctx->ib_dev, - tun_qp->ring[i].addr, - rx_buf_size, - DMA_FROM_DEVICE); - if (ib_dma_mapping_error(ctx->ib_dev, tun_qp->ring[i].map)) { + tun_qp->ring[i].map = dma_map_single(ctx->ib_dev->dma_device, + tun_qp->ring[i].addr, + rx_buf_size, + DMA_FROM_DEVICE); + if (dma_mapping_error(ctx->ib_dev->dma_device, tun_qp->ring[i].map)) { kfree(tun_qp->ring[i].addr); goto err; } @@ -1643,11 +1644,10 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx, if (!tun_qp->tx_ring[i].buf.addr) goto tx_err; tun_qp->tx_ring[i].buf.map = - ib_dma_map_single(ctx->ib_dev, - tun_qp->tx_ring[i].buf.addr, - tx_buf_size, - DMA_TO_DEVICE); - if (ib_dma_mapping_error(ctx->ib_dev, + dma_map_single(ctx->ib_dev->dma_device, + tun_qp->tx_ring[i].buf.addr, + tx_buf_size, DMA_TO_DEVICE); + if (dma_mapping_error(ctx->ib_dev->dma_device, tun_qp->tx_ring[i].buf.map)) { kfree(tun_qp->tx_ring[i].buf.addr); goto tx_err; @@ -1664,8 +1664,9 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx, tx_err: while (i > 0) { --i; - ib_dma_unmap_single(ctx->ib_dev, tun_qp->tx_ring[i].buf.map, - tx_buf_size, DMA_TO_DEVICE); + dma_unmap_single(ctx->ib_dev->dma_device, + tun_qp->tx_ring[i].buf.map, + tx_buf_size, DMA_TO_DEVICE); kfree(tun_qp->tx_ring[i].buf.addr); } kfree(tun_qp->tx_ring); @@ -1674,8 +1675,8 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx, err: while (i > 0) { --i; - ib_dma_unmap_single(ctx->ib_dev, tun_qp->ring[i].map, - rx_buf_size, DMA_FROM_DEVICE); + dma_unmap_single(ctx->ib_dev->dma_device, tun_qp->ring[i].map, + rx_buf_size, DMA_FROM_DEVICE); kfree(tun_qp->ring[i].addr); } kfree(tun_qp->ring); @@ -1704,14 +1705,14 @@ static void mlx4_ib_free_pv_qp_bufs(struct mlx4_ib_demux_pv_ctx *ctx, for (i = 0; i < MLX4_NUM_TUNNEL_BUFS; i++) { - ib_dma_unmap_single(ctx->ib_dev, tun_qp->ring[i].map, - rx_buf_size, DMA_FROM_DEVICE); + dma_unmap_single(ctx->ib_dev->dma_device, tun_qp->ring[i].map, + rx_buf_size, DMA_FROM_DEVICE); kfree(tun_qp->ring[i].addr); } for (i = 0; i < MLX4_NUM_TUNNEL_BUFS; i++) { - ib_dma_unmap_single(ctx->ib_dev, tun_qp->tx_ring[i].buf.map, - tx_buf_size, DMA_TO_DEVICE); + dma_unmap_single(ctx->ib_dev->dma_device, tun_qp->tx_ring[i].buf.map, + tx_buf_size, DMA_TO_DEVICE); kfree(tun_qp->tx_ring[i].buf.addr); if (tun_qp->tx_ring[i].ah) ib_destroy_ah(tun_qp->tx_ring[i].ah); diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c index 5d73989d9771..00d08e6b3b09 100644 --- a/drivers/infiniband/hw/mlx4/mr.c +++ b/drivers/infiniband/hw/mlx4/mr.c @@ -538,13 +538,13 @@ int mlx4_ib_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents, mr->npages = 0; - ib_dma_sync_single_for_cpu(ibmr->device, mr->page_map, - mr->page_map_size, DMA_TO_DEVICE); + dma_sync_single_for_cpu(ibmr->device->dma_device, mr->page_map, + mr->page_map_size, DMA_TO_DEVICE); rc = ib_sg_to_pages(ibmr, sg, sg_nents, sg_offset, mlx4_set_page); - ib_dma_sync_single_for_device(ibmr->device, mr->page_map, - mr->page_map_size, DMA_TO_DEVICE); + dma_sync_single_for_device(ibmr->device->dma_device, mr->page_map, + mr->page_map_size, DMA_TO_DEVICE); return rc; } diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index c068add8838b..a8f4e4d37e4f 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -570,10 +570,11 @@ static int alloc_proxy_bufs(struct ib_device *dev, struct mlx4_ib_qp *qp) if (!qp->sqp_proxy_rcv[i].addr) goto err; qp->sqp_proxy_rcv[i].map = - ib_dma_map_single(dev, qp->sqp_proxy_rcv[i].addr, - sizeof (struct mlx4_ib_proxy_sqp_hdr), - DMA_FROM_DEVICE); - if (ib_dma_mapping_error(dev, qp->sqp_proxy_rcv[i].map)) { + dma_map_single(dev->dma_device, + qp->sqp_proxy_rcv[i].addr, + sizeof (struct mlx4_ib_proxy_sqp_hdr), + DMA_FROM_DEVICE); + if (dma_mapping_error(dev->dma_device, qp->sqp_proxy_rcv[i].map)) { kfree(qp->sqp_proxy_rcv[i].addr); goto err; } @@ -583,9 +584,9 @@ static int alloc_proxy_bufs(struct ib_device *dev, struct mlx4_ib_qp *qp) err: while (i > 0) { --i; - ib_dma_unmap_single(dev, qp->sqp_proxy_rcv[i].map, - sizeof (struct mlx4_ib_proxy_sqp_hdr), - DMA_FROM_DEVICE); + dma_unmap_single(dev->dma_device, qp->sqp_proxy_rcv[i].map, + sizeof (struct mlx4_ib_proxy_sqp_hdr), + DMA_FROM_DEVICE); kfree(qp->sqp_proxy_rcv[i].addr); } kfree(qp->sqp_proxy_rcv); @@ -598,9 +599,9 @@ static void free_proxy_bufs(struct ib_device *dev, struct mlx4_ib_qp *qp) int i; for (i = 0; i < qp->rq.wqe_cnt; i++) { - ib_dma_unmap_single(dev, qp->sqp_proxy_rcv[i].map, - sizeof (struct mlx4_ib_proxy_sqp_hdr), - DMA_FROM_DEVICE); + dma_unmap_single(dev->dma_device, qp->sqp_proxy_rcv[i].map, + sizeof (struct mlx4_ib_proxy_sqp_hdr), + DMA_FROM_DEVICE); kfree(qp->sqp_proxy_rcv[i].addr); } kfree(qp->sqp_proxy_rcv); @@ -3306,10 +3307,10 @@ int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, if (qp->mlx4_ib_qp_type & (MLX4_IB_QPT_PROXY_SMI_OWNER | MLX4_IB_QPT_PROXY_SMI | MLX4_IB_QPT_PROXY_GSI)) { - ib_dma_sync_single_for_device(ibqp->device, - qp->sqp_proxy_rcv[ind].map, - sizeof (struct mlx4_ib_proxy_sqp_hdr), - DMA_FROM_DEVICE); + dma_sync_single_for_device(ibqp->device->dma_device, + qp->sqp_proxy_rcv[ind].map, + sizeof(struct mlx4_ib_proxy_sqp_hdr), + DMA_FROM_DEVICE); scat->byte_count = cpu_to_be32(sizeof (struct mlx4_ib_proxy_sqp_hdr)); /* use dma lkey from upper layer entry */