From patchwork Thu Jan 12 19:07:05 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: 9514033 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 CBD49601E5 for ; Thu, 12 Jan 2017 19:11:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCC3A286DC for ; Thu, 12 Jan 2017 19:11:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1AFE2870D; Thu, 12 Jan 2017 19:11:14 +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 5E4E92870C for ; Thu, 12 Jan 2017 19:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751194AbdALTKx (ORCPT ); Thu, 12 Jan 2017 14:10:53 -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 S1751059AbdALTI3 (ORCPT ); Thu, 12 Jan 2017 14:08:29 -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=w1TbrEBgUAxdVYCMuPcxq9u8my/sxhR1dDSsA4cD5eM=; b=pvPp9FQGd4RsXHytgM96PFHNT/eN4x5Zic3ZHCkyBHpW/Z3BE5qU3FmBNGa2cVRe12zFAZxUEX1voqzG1iDDBS1tlHEhq++lphJotdg4x/m0SbY+tbi0Y9f6sjzrH9ERRPbvKd2AkFNyfVrp/XDC9aCm7VfPlEHDfg8T2grLbZo= Received: from BY1PR0201CA0034.namprd02.prod.outlook.com (10.160.191.172) 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 BY2FFO11OLC002.protection.gbl (2a01:111:f400:7c0c::193) by BY1PR0201CA0034.outlook.office365.com (2a01:111:e400:4814::44) 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.225) 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.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BY2FFO11OLC002.mail.protection.outlook.com (10.1.15.178) 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 MILHUBIP03.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 51.7B.01420.4F1D7785; Thu, 12 Jan 2017 10:59:01 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 12 Jan 2017 11:07:58 -0800 X-AuditID: 0ac94371-7ee9b9800001058c-cb-5877d1f43b6f Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 5C.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 13/26] IB/core: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:05 -0800 Message-ID: <20170112190718.6728-14-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+NgFjrPLMWRmVeSWpSXmKPExsXCddJ5ke7Xi+URBi2f2Cxenv/AatG8eD2b xeVdc9gsnh3qZXFg8dg/dw27x/t9V9k8Pm+SC2CO4rJJSc3JLEst0rdL4Mo423SBteBiasWk 7kMsDYz3grsYOTkkBEwktj+4yNTFyMUhJLCUSWJ/Yw8zSEJIYBujxNknKV2MHGBFvTMDIMIb GSV2XBEHsdkEjCS+vZ/JAmKLCKhJbHq1iB1kDrPAYkaJ9tPLwOYICzhJfDv8kwVkDouAqsSy BkuQMK+AvUT/vD5GiBvkJXa1XWQFsTmB4t/+X2KE2GUnsevAfxaQmRICTawSr5ZsZoRoFpQ4 OfMJ2GJmAQmJgy9eQN2sLnFyyXymCYxCs5CUzUJStoCRaRWjWG5mTnFuemqBoYlecWJeSmZx tl5yfu4mRkgwF+5gfH3b+xCjAAejEg/vDpuyCCHWxLLiytxDjBIczEoivLPOl0cI8aYkVlal FuXHF5XmpBYfYpTmYFES570Y/TFMSCA9sSQ1OzW1ILUIJsvEwSnVwMjYvfjSrgdLNKe42N0K 8PScUro6RD3y8FmR8kPmxnslShZryH78ZXPqh+KeriKDasm8PzJdgRVFGXFmu6ZIXyq6/XyR xOeE/wd+uO7YzHVe/G3YhasBZwwNGT60cJf7qf2ZsOF+9Kvt5yQe33pgcItz8+yV0RvL4j/M ZvWp3yHpL+PsGBNfsFiJpTgj0VCLuag4EQCOZO5QYgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPJMWRmVeSWpSXmKPExsXCtZGTTZfvSnmEQWOXrsXBn22MFi/Pf2C1 aF68ns3i8q45bBbPDvWyOLB67J+7ht3j/b6rbB7T1pxn8vi8SS6AJYrLJiU1J7MstUjfLoEr 42zTBdaCi6kVk7oPsTQw3gvuYuTgkBAwkeidGdDFyMUhJLCeUeLrnmNMXYycHGwCRhLf3s9k AbFFBNQkNr1axA5iMwssZJSY+EsKxBYWcJL4dvgnC8gcFgFViWUNliBhXgF7iY2/ZoKVSwjI S+xqu8gKYnMCxb/9v8QIYgsJ2EnsOvCfZQIj9wJGhlWMYrmZOcW56ZkFhkZ6xYl5KZnF2XrJ +bmbGCFBELWD8fpE80OMTBycUg2Mtl573YrZXNyORDslpvGvntI9wYl/j+Br1QyPFN+thiJN 9+6bqTRqBnLMWtF4XN0r4uv8lAdKz149mOc8ja/EKLtm7ZX9Vx5WusR5bMxwdzab77/pc+iX Db4xD6MtlP+n5fmX7n6++N/sOoE1LXXqcUJO1VYfRYXmhAsqB518cSB02u65jNVKLMUZiYZa zEXFiQAmMkEssgEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; 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)(4001430100002)(106466001)(305945005)(69596002)(5003940100001)(50986999)(76176999)(5660300001)(626004)(189998001)(2950100002)(6916009)(110136003)(36756003)(107886002)(6666003)(4326007)(33646002)(575784001)(2906002)(97736004)(48376002)(356003)(2270400002)(86362001)(50466002)(54906002)(1076002)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB048; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC002; 1:eXgxNLB5bHp3oDRsGp153yGsBFfdlqArPfa5ekTVKwTB8qtVfq0cVNIZfR8Y+aiSXeX1h+i3lIqJVfCXzJPMQCJZtYcHSFICxeTeM6r4vVrlWTHP8GtMdjSMdsVgs+lJ2IRSf+uDvyHLhKihzj0gImBlRE9JO1BVJ5SJxFu7Owsem9Ze7YxhvKeag24p6WGPeBDD9oeIp/KpG/Ylm2FWrBhqbKj5dvjd/vNxszAqGF9sJsm9+P4tOLjq2vuHCKeQ/yaLIyoCJxTvIQYaoL2OQq7CI4yFIs7H6w/fTUheJXzguHWl2/ZWuTzWeOL0x5BhNeNftJeoPU+zT5+3IjynYivtlYEKsFNGrZnOE08hWuM0c0glEnMSm+u8s27AZgrcEsbPa2fuKs4+Aa9CxQdZJ9hxFuC5TlwDZwu4qcLBvQ1h8cKod99tnlUGj0BD0tEDIeYxOBMFLIBrmlYvAsrE3KSb/IFm7gt2UWc+YaCHtvtGrcHCI4tNEo4XMQ6CZZhx X-MS-Office365-Filtering-Correlation-Id: 52407df8-41e5-4201-586d-08d43b1e5875 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 3:3aasEpycjB2XW9JG7uX9cm9MKzSi9Azy9pdrAt1JEippk82edF/qDYpLVMmlfu6IncM8u1PEznc3t7Fbg6ye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N7PvWOUz3YnYHPnhdIflSd7kqRHnyrAAf0b7LZQ9HAE754yOyWPQeEARYxWnRCxacYZ5U1xcP9XnxRXbwywHtMz55Vw4FL6WQXUJfiWZCrtL7V7MkVf9 X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 31:+zy/oDFubg4452ukINTP5jxfcOkiV4q4IfceLF4lnO7DTHHxyYxmgNhcgYtnf98a1O3wG1yKDWs8JK7h3Bb4uuFh5yyhtlG3eZJBYD04nIPmHFUntO5jQrS5+UdNM+MHrE4gaGXw7Tg+FhlELzvs5nG+UrXJCBHM6mtuOMH8Ts1EH7+AN8gV+FcOkFsuybVXj94X3wI+w2uMoS+njl/ZNhbJwHU6ATr9TWwIoVw0nxOq+6NDJUxLph3jqi2OZ9mRT34xTqlPi9GGlD8U0pvvJg==; 20:4SaAudB4bnLeXDWU4dHcoufkCqVjFjqPT0TNz2z7CbbOd3NzTgCpIIpLJzI5Jv5I7cSpFmd71sru3rwDtmdVHnJCCT0B7tiVncXiegpKm6FudPn7/QzX7vsv47H3hfgPje70e8nBKomcjl1HNCSBopp2V+j2Oe4dqZq2sPw9/eZHm6iOxvVTPCEC7bauEX7N2R96MWseEmYFGm4SU3b9hJ4cJZ6gm4mAxuLwuhKzVmlCp+79M1tkOS0BCqKj//a+amSH3gQTf8/s3kWUdwpN/G+g/mvYtuTm6FTWRzwjU4yG/Boz9F50M+UV/vkbi/CvUSOeFLVsT/J38czTvduw4RnIvkoETTYkXB638K5Z2rkUr6UbhPaWi5I1XiteTEcHy0TgCTZL3llXyoc65fcMDuCP1hGVK73+3K1ZDhsodiVxHndODBdHcIv6oyvmYMZIRjZ2XJBAEqqO6V+PFy9uXh+z6NIsUzX6VsJ8U0uCwCxGN7bKaUtSTPhDCmCt0Mrl 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:5wgSWC8l30xwjwD/ASVe2lzU0Ww8QGlaqIgjHjUxCvA9xKP3YiPPzXq4q4S+INDYsIA4Ynpn4i7PdRsLgj24zACy3eDzt0t9OqYEBQG0co2GAopXQy8N098mmfOzwbiDfumgJxCRH6GMn9Dhwc6R9Fd6o6zkj1n+ZPvCHXADsBpZ9I7S6XqnXdOGKB57fU8OdzfQc3JyYf1AXIMaaqYTPMXB8jrZnCpM6CFwvKdFCyuayjgm3GsEr/qqle3h3PYeaJ/DSRub/ArSkMqVETw7EzF4gZCNBT2A3wTgWbrgEW8wPmVpvrP8Xf+dZwvPHBviRfUcBRr9gjdYzBkMigBA1nftfFbPVekS9UUbHZvdUXBJZjF2hz8CtZaVFSu4z4ekQK5F0qa01AfQs3zGbCRMJG/YBVWZE1NK2Q9YklA4OHASlBvi3d7lRyIKh8OUm1gmfA41DdgpvXX415jdFH4gNVP38MOPDe4RNgF/bLikzp4IpuLpU2VzIRcskUNhZMrJw1RC7egjiw0cWbpwrwRpenDeS+DwmuP8aq3H/Ke8jRAyPP7+Aqcj4+9cleKjut4qkA0ntD+aatS+eBds7oP58U2MVMpAbn2YEEdMp8RBFPrnGNf/qUlRArWZe+ESSN2h6wnYH7rEvmnez5LuFDVUKOawZFR+3KRGZt0BSKcduicunctpEIdA93F6T2X9HoJYqkoEiCdX9iZZV3w+fChOswiuvTc9Zwpr28sPqzwA8FE= X-Forefront-PRVS: 018577E36E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR02MB048; 23:ghU0Yrfz7pvLB4P3vn2/2X4bJ6VXZWSRvu9cAoHh5Q?= =?us-ascii?Q?Ui5IDVjzyFGrwef/inT63Qta0bYaxQ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noYyv+ffjB6dHl0eAqbIJIaL/PKTl6Pj5FRA5q1RZl6S6shpgMFgBE8YaFGg6gdKRnur2ayB1uHAcRRujCdIoM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 7:5gWWPpAH2c/KcoDGpsDYjg4S/x4qqtvEhyTwxVYDJse6MkhbvC18YphbwyWFvgPcmu2aiC6NuMLmurfYRQodozjncnO4NCwu5Bbx4L8HGqufKK/PoXFtqdz89LgHMnrqVOkmQqDpqb4egWPzBXUpgFKlSKSrIf1uOOnJP2z+LAB0LB2Zj5rwynDfpzXZfIZQG4K1ZNXwnWk1UensSGhA3u0PQYwNmdr0frtZTuiVoN8heMSTakgMFcSpp92WOJOargcYeJHp7hl42ZwqbMRp9jTBwVIli1jFgzan380V+/2JO8QX3x0b5wyx+I7rcWYTbPBg67AiWzCUP1rCpM05wzFQf0YssBTswyIhaxgE0RjFELe+KqIYxpBZtKo7V1Php5nZIOGkaYPlaPbhQRuJ/OwQbMAlkmvLQSG2ZQ5Lu2pOBxtkzr+NP0HHUR2VHe3iyj88D7/cGKrfjBb6daQBQg== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:08.1793 (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.225]; Helo=[milsmgep14.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 Most changes in this patch and the subsequent patches, except for the removal of variables that became superfluous and indentation adjustments, have been generated as follows: git grep -lE 'ib_(sg_|)dma_' | xargs -d\\n \ sed -i -e 's/\([^[:alnum:]_]\)ib_dma_\([^(]*\)(\&\([^,]\+\),/\1dma_\2(\3.dma_device,/g' \ -e 's/\([^[:alnum:]_]\)ib_dma_\([^(]*\)(\([^,]\+\),/\1dma_\2(\3->dma_device,/g' \ -e 's/ib_sg_dma_\(len\|address\)(\([^,]\+\), /sg_dma_\1(/g' Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg --- drivers/infiniband/core/mad.c | 79 ++++++++++++++++++-------------------- drivers/infiniband/core/rw.c | 30 +++++++-------- drivers/infiniband/core/umem.c | 13 +++---- drivers/infiniband/core/umem_odp.c | 12 +++--- 4 files changed, 61 insertions(+), 73 deletions(-) diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index a009f7132c73..79aeef810c2e 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -1152,23 +1152,21 @@ int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr) mad_agent = mad_send_wr->send_buf.mad_agent; sge = mad_send_wr->sg_list; - sge[0].addr = ib_dma_map_single(mad_agent->device, - mad_send_wr->send_buf.mad, - sge[0].length, - DMA_TO_DEVICE); - if (unlikely(ib_dma_mapping_error(mad_agent->device, sge[0].addr))) + sge[0].addr = dma_map_single(mad_agent->device->dma_device, + mad_send_wr->send_buf.mad, + sge[0].length, DMA_TO_DEVICE); + if (unlikely(dma_mapping_error(mad_agent->device->dma_device, sge[0].addr))) return -ENOMEM; mad_send_wr->header_mapping = sge[0].addr; - sge[1].addr = ib_dma_map_single(mad_agent->device, - ib_get_payload(mad_send_wr), - sge[1].length, - DMA_TO_DEVICE); - if (unlikely(ib_dma_mapping_error(mad_agent->device, sge[1].addr))) { - ib_dma_unmap_single(mad_agent->device, - mad_send_wr->header_mapping, - sge[0].length, DMA_TO_DEVICE); + sge[1].addr = dma_map_single(mad_agent->device->dma_device, + ib_get_payload(mad_send_wr), + sge[1].length, DMA_TO_DEVICE); + if (unlikely(dma_mapping_error(mad_agent->device->dma_device, sge[1].addr))) { + dma_unmap_single(mad_agent->device->dma_device, + mad_send_wr->header_mapping, + sge[0].length, DMA_TO_DEVICE); return -ENOMEM; } mad_send_wr->payload_mapping = sge[1].addr; @@ -1189,12 +1187,12 @@ int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr) } spin_unlock_irqrestore(&qp_info->send_queue.lock, flags); if (ret) { - ib_dma_unmap_single(mad_agent->device, - mad_send_wr->header_mapping, - sge[0].length, DMA_TO_DEVICE); - ib_dma_unmap_single(mad_agent->device, - mad_send_wr->payload_mapping, - sge[1].length, DMA_TO_DEVICE); + dma_unmap_single(mad_agent->device->dma_device, + mad_send_wr->header_mapping, + sge[0].length, DMA_TO_DEVICE); + dma_unmap_single(mad_agent->device->dma_device, + mad_send_wr->payload_mapping, + sge[1].length, DMA_TO_DEVICE); } return ret; } @@ -2191,10 +2189,8 @@ static void ib_mad_recv_done(struct ib_cq *cq, struct ib_wc *wc) mad_priv_hdr = container_of(mad_list, struct ib_mad_private_header, mad_list); recv = container_of(mad_priv_hdr, struct ib_mad_private, header); - ib_dma_unmap_single(port_priv->device, - recv->header.mapping, - mad_priv_dma_size(recv), - DMA_FROM_DEVICE); + dma_unmap_single(port_priv->device->dma_device, recv->header.mapping, + mad_priv_dma_size(recv), DMA_FROM_DEVICE); /* Setup MAD receive work completion from "normal" work completion */ recv->header.wc = *wc; @@ -2432,12 +2428,12 @@ static void ib_mad_send_done(struct ib_cq *cq, struct ib_wc *wc) qp_info = send_queue->qp_info; retry: - ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device, - mad_send_wr->header_mapping, - mad_send_wr->sg_list[0].length, DMA_TO_DEVICE); - ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device, - mad_send_wr->payload_mapping, - mad_send_wr->sg_list[1].length, DMA_TO_DEVICE); + dma_unmap_single(mad_send_wr->send_buf.mad_agent->device->dma_device, + mad_send_wr->header_mapping, + mad_send_wr->sg_list[0].length, DMA_TO_DEVICE); + dma_unmap_single(mad_send_wr->send_buf.mad_agent->device->dma_device, + mad_send_wr->payload_mapping, + mad_send_wr->sg_list[1].length, DMA_TO_DEVICE); queued_send_wr = NULL; spin_lock_irqsave(&send_queue->lock, flags); list_del(&mad_list->list); @@ -2853,11 +2849,11 @@ static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info, } } sg_list.length = mad_priv_dma_size(mad_priv); - sg_list.addr = ib_dma_map_single(qp_info->port_priv->device, - &mad_priv->grh, - mad_priv_dma_size(mad_priv), - DMA_FROM_DEVICE); - if (unlikely(ib_dma_mapping_error(qp_info->port_priv->device, + sg_list.addr = dma_map_single(qp_info->port_priv->device->dma_device, + &mad_priv->grh, + mad_priv_dma_size(mad_priv), + DMA_FROM_DEVICE); + if (unlikely(dma_mapping_error(qp_info->port_priv->device->dma_device, sg_list.addr))) { ret = -ENOMEM; break; @@ -2878,10 +2874,10 @@ static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info, list_del(&mad_priv->header.mad_list.list); recv_queue->count--; spin_unlock_irqrestore(&recv_queue->lock, flags); - ib_dma_unmap_single(qp_info->port_priv->device, - mad_priv->header.mapping, - mad_priv_dma_size(mad_priv), - DMA_FROM_DEVICE); + dma_unmap_single(qp_info->port_priv->device->dma_device, + mad_priv->header.mapping, + mad_priv_dma_size(mad_priv), + DMA_FROM_DEVICE); kfree(mad_priv); dev_err(&qp_info->port_priv->device->dev, "ib_post_recv failed: %d\n", ret); @@ -2917,10 +2913,9 @@ static void cleanup_recv_queue(struct ib_mad_qp_info *qp_info) /* Remove from posted receive MAD list */ list_del(&mad_list->list); - ib_dma_unmap_single(qp_info->port_priv->device, - recv->header.mapping, - mad_priv_dma_size(recv), - DMA_FROM_DEVICE); + dma_unmap_single(qp_info->port_priv->device->dma_device, + recv->header.mapping, mad_priv_dma_size(recv), + DMA_FROM_DEVICE); kfree(recv); } diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c index dbfd854c32c9..f8aef874f636 100644 --- a/drivers/infiniband/core/rw.c +++ b/drivers/infiniband/core/rw.c @@ -178,7 +178,6 @@ static int rdma_rw_init_map_wrs(struct rdma_rw_ctx *ctx, struct ib_qp *qp, struct scatterlist *sg, u32 sg_cnt, u32 offset, u64 remote_addr, u32 rkey, enum dma_data_direction dir) { - struct ib_device *dev = qp->pd->device; u32 max_sge = dir == DMA_TO_DEVICE ? qp->max_write_sge : qp->max_read_sge; struct ib_sge *sge; @@ -208,8 +207,8 @@ static int rdma_rw_init_map_wrs(struct rdma_rw_ctx *ctx, struct ib_qp *qp, rdma_wr->wr.sg_list = sge; for (j = 0; j < nr_sge; j++, sg = sg_next(sg)) { - sge->addr = ib_sg_dma_address(dev, sg) + offset; - sge->length = ib_sg_dma_len(dev, sg) - offset; + sge->addr = sg_dma_address(sg) + offset; + sge->length = sg_dma_len(sg) - offset; sge->lkey = qp->pd->local_dma_lkey; total_len += sge->length; @@ -235,14 +234,13 @@ static int rdma_rw_init_single_wr(struct rdma_rw_ctx *ctx, struct ib_qp *qp, struct scatterlist *sg, u32 offset, u64 remote_addr, u32 rkey, enum dma_data_direction dir) { - struct ib_device *dev = qp->pd->device; struct ib_rdma_wr *rdma_wr = &ctx->single.wr; ctx->nr_ops = 1; ctx->single.sge.lkey = qp->pd->local_dma_lkey; - ctx->single.sge.addr = ib_sg_dma_address(dev, sg) + offset; - ctx->single.sge.length = ib_sg_dma_len(dev, sg) - offset; + ctx->single.sge.addr = sg_dma_address(sg) + offset; + ctx->single.sge.length = sg_dma_len(sg) - offset; memset(rdma_wr, 0, sizeof(*rdma_wr)); if (dir == DMA_TO_DEVICE) @@ -280,7 +278,7 @@ int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num, struct ib_device *dev = qp->pd->device; int ret; - ret = ib_dma_map_sg(dev, sg, sg_cnt, dir); + ret = dma_map_sg(dev->dma_device, sg, sg_cnt, dir); if (!ret) return -ENOMEM; sg_cnt = ret; @@ -289,7 +287,7 @@ int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num, * Skip to the S/G entry that sg_offset falls into: */ for (;;) { - u32 len = ib_sg_dma_len(dev, sg); + u32 len = sg_dma_len(sg); if (sg_offset < len) break; @@ -319,7 +317,7 @@ int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num, return ret; out_unmap_sg: - ib_dma_unmap_sg(dev, sg, sg_cnt, dir); + dma_unmap_sg(dev->dma_device, sg, sg_cnt, dir); return ret; } EXPORT_SYMBOL(rdma_rw_ctx_init); @@ -358,12 +356,12 @@ int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, return -EINVAL; } - ret = ib_dma_map_sg(dev, sg, sg_cnt, dir); + ret = dma_map_sg(dev->dma_device, sg, sg_cnt, dir); if (!ret) return -ENOMEM; sg_cnt = ret; - ret = ib_dma_map_sg(dev, prot_sg, prot_sg_cnt, dir); + ret = dma_map_sg(dev->dma_device, prot_sg, prot_sg_cnt, dir); if (!ret) { ret = -ENOMEM; goto out_unmap_sg; @@ -457,9 +455,9 @@ int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, out_free_ctx: kfree(ctx->sig); out_unmap_prot_sg: - ib_dma_unmap_sg(dev, prot_sg, prot_sg_cnt, dir); + dma_unmap_sg(dev->dma_device, prot_sg, prot_sg_cnt, dir); out_unmap_sg: - ib_dma_unmap_sg(dev, sg, sg_cnt, dir); + dma_unmap_sg(dev->dma_device, sg, sg_cnt, dir); return ret; } EXPORT_SYMBOL(rdma_rw_ctx_signature_init); @@ -606,7 +604,7 @@ void rdma_rw_ctx_destroy(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num, break; } - ib_dma_unmap_sg(qp->pd->device, sg, sg_cnt, dir); + dma_unmap_sg(qp->pd->device->dma_device, sg, sg_cnt, dir); } EXPORT_SYMBOL(rdma_rw_ctx_destroy); @@ -631,11 +629,11 @@ void rdma_rw_ctx_destroy_signature(struct rdma_rw_ctx *ctx, struct ib_qp *qp, return; ib_mr_pool_put(qp, &qp->rdma_mrs, ctx->sig->data.mr); - ib_dma_unmap_sg(qp->pd->device, sg, sg_cnt, dir); + dma_unmap_sg(qp->pd->device->dma_device, sg, sg_cnt, dir); if (ctx->sig->prot.mr) { ib_mr_pool_put(qp, &qp->rdma_mrs, ctx->sig->prot.mr); - ib_dma_unmap_sg(qp->pd->device, prot_sg, prot_sg_cnt, dir); + dma_unmap_sg(qp->pd->device->dma_device, prot_sg, prot_sg_cnt, dir); } ib_mr_pool_put(qp, &qp->sig_mrs, ctx->sig->sig_mr); diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 1e62a5f0cb28..d30803441f68 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -50,9 +50,8 @@ static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int d int i; if (umem->nmap > 0) - ib_dma_unmap_sg(dev, umem->sg_head.sgl, - umem->npages, - DMA_BIDIRECTIONAL); + dma_unmap_sg(dev->dma_device, umem->sg_head.sgl, umem->npages, + DMA_BIDIRECTIONAL); for_each_sg(umem->sg_head.sgl, sg, umem->npages, i) { @@ -214,11 +213,9 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, sg_list_start = sg; } - umem->nmap = ib_dma_map_sg_attrs(context->device, - umem->sg_head.sgl, - umem->npages, - DMA_BIDIRECTIONAL, - dma_attrs); + umem->nmap = dma_map_sg_attrs(context->device->dma_device, + umem->sg_head.sgl, umem->npages, + DMA_BIDIRECTIONAL, dma_attrs); if (umem->nmap <= 0) { ret = -ENOMEM; diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index 6b079a31dced..8ebaf97bd7be 100644 --- a/drivers/infiniband/core/umem_odp.c +++ b/drivers/infiniband/core/umem_odp.c @@ -456,11 +456,9 @@ static int ib_umem_odp_map_dma_single_page( goto out; } if (!(umem->odp_data->dma_list[page_index])) { - dma_addr = ib_dma_map_page(dev, - page, - 0, PAGE_SIZE, - DMA_BIDIRECTIONAL); - if (ib_dma_mapping_error(dev, dma_addr)) { + dma_addr = dma_map_page(dev->dma_device, page, 0, PAGE_SIZE, + DMA_BIDIRECTIONAL); + if (dma_mapping_error(dev->dma_device, dma_addr)) { ret = -EFAULT; goto out; } @@ -645,8 +643,8 @@ void ib_umem_odp_unmap_dma_pages(struct ib_umem *umem, u64 virt, WARN_ON(!dma_addr); - ib_dma_unmap_page(dev, dma_addr, PAGE_SIZE, - DMA_BIDIRECTIONAL); + dma_unmap_page(dev->dma_device, dma_addr, PAGE_SIZE, + DMA_BIDIRECTIONAL); if (dma & ODP_WRITE_ALLOWED_BIT) { struct page *head_page = compound_head(page); /*