From patchwork Thu Jan 12 19:07:16 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: 9514017 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 F0E54601E5 for ; Thu, 12 Jan 2017 19:10:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1627286DB for ; Thu, 12 Jan 2017 19:10:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5EAF2870C; Thu, 12 Jan 2017 19:10:22 +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 C3006286DB for ; Thu, 12 Jan 2017 19:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750911AbdALTIf (ORCPT ); Thu, 12 Jan 2017 14:08:35 -0500 Received: from mail-sn1nam01on0074.outbound.protection.outlook.com ([104.47.32.74]:14592 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750945AbdALTIK (ORCPT ); Thu, 12 Jan 2017 14:08:10 -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=e38xTBc5/YBXoNhDYEpaCjchcTKQBzl2y287L7ohcGA=; b=O986WB/lILN9pnav7PsRGsHt746GcVGTqtWX3ZKWiTC7j7BCZTZU4m0WRQsmnArQWu501HqdcJLm5zqbqLMcxe1oDGFuc7UM9VmABH1sdAIS/B/WRSyAX54eyIkC7pibLuwixbqPbDRQ6nfgq4QiQxc8HneHL6Mq9CdXyLhaTtI= Received: from BLUPR0201CA0031.namprd02.prod.outlook.com (10.163.116.41) by CY1PR02MB1413.namprd02.prod.outlook.com (10.161.171.15) 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 BY2FFO11FD007.protection.gbl (2a01:111:f400:7c0c::155) by BLUPR0201CA0031.outlook.office365.com (2a01:111:e400:52e7::41) 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:07 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 BY2FFO11FD007.mail.protection.outlook.com (10.1.14.128) 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:06 +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 A3.A0.65426.A61D7785; 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-ef-5877d16ac4e1 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id F0.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 , Santosh Shilimkar Subject: [PATCH v2 24/26] net/rds: Inline ib_dma_map_*() functions Date: Thu, 12 Jan 2017 11:07:16 -0800 Message-ID: <20170112190718.6728-25-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+NgFrrNLMWRmVeSWpSXmKPExsXCddJ5kW72xfIIgzv3WSxenv/AatG8eD2b xeVdc9gsnh3qZbF4OOE8iwOrx/65a9g9Pj69xeLxft9VNo/Pm+QCWKK4bFJSczLLUov07RK4 Mrq37mEvmFdX8bt9I2sD44y0LkZODgkBE4kX+y4ygdhCAkuZJN5PS+li5AKytzFKvHgwiw2m qH/TYTaIxEZGiQlNz8A62ASMJL69n8kCYosIqElserWIHaSIWeA6o8TObWfYQRLCAk4SW57e B7I5OFgEVCWmdYIN5RWwl1i4dB0LxAJ5iV1tF1lBbE6g+Lf/lxghLrKT2HXgPwvITAmBSawS a35cYYRoFpQ4OfMJWDOzgITEwRcvmCEa1CVOLpnPNIFRaBaSsllIyhYwMq1iFMvNzCnOTU8t MDTVK07MS8ksztZLzs/dxAgJ8swdjHefeB9iFOBgVOLh3WFTFiHEmlhWXJl7iFGCg1lJhHfW +fIIId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rxu976ECQmkJ5akZqemFqQWwWSZODilGhijFFsX r2ny6Pl138vY5rZTwZmlfxr02qZKH1+qqyO77Jozj3PSig2Tn9m6rZ5Wbh1z23GOZee/udyT V79w5Q9ZHhq69G/Ya56Mh686CuZtFZEJ0MvT3HyYQSo5vaVsraHgtLnOCgvulITo2Qs1zMle IFV47LPe4bvHf7TvEU9beu961v2L6m+UWIozEg21mIuKEwFSJfufbgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNJMWRmVeSWpSXmKPExsXCtZGTTZf/SnmEwZv3vBYHf7YxWrw8/4HV onnxejaLy7vmsFk8O9TLYvFwwnkWBzaP/XPXsHt8fHqLxeP9vqtsHtPWnGfy+LxJLoA1issm JTUnsyy1SN8ugSuje+se9oJ5dRW/2zeyNjDOSOti5OSQEDCR6N90mK2LkYtDSGA9o8SP77OY QBJsAkYS397PZAGxRQTUJDa9WsQOUsQscJVR4sm99+wgCWEBJ4ktT+8D2RwcLAKqEtM62UDC vAL2EpMOHmCFWCAvsavtIpjNCRT/9v8SI4gtJGAnsevAf5YJjNwLGBlWMYrlZuYU56ZnFhga 6RUn5qVkFmfrJefnbmKEBEfUDsbrE80PMTJxcEo1MC4/G8YrN0Fv/pspaQq1+6/sDe//9O1r 87JVmx2FIldcupEaH3e95bzX3q7s+S8/s4gt5r2/YM/h01+33n9epqxnHMq8ZJtitkvoRK13 k/n7Et6ektMMvJi2V+LovIy39eISnl8O2pTeklp6VamnS3vzd9P+piq93hDHRSlLH9gw1okm i3WJiCuxFGckGmoxFxUnAgCu0q1zvgEAAA== 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)(39850400002)(39410400002)(39860400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(50986999)(81156014)(86362001)(8936002)(97736004)(81166006)(76176999)(47776003)(50226002)(5003940100001)(92566002)(8676002)(50466002)(356003)(68736007)(33646002)(305945005)(189998001)(48376002)(1076002)(2950100002)(6916009)(38730400001)(106466001)(4326007)(2906002)(5660300001)(626004)(110136003)(6666003)(54906002)(36756003)(2270400002)(69596002)(77096006)(50929005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR02MB1413; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD007; 1:f4Ievn9rBQKEb0IrF7eR2geCuGJTYa/JKnJ6oZcfROBLhvfrKUgw3B+Jnpei0180wAj3YGEaE0YnjpObdghzrMdt168tgkdpQX3EHv8TCrDgzH/Rp4mJ4WlIR9lK+2JlDR2iJmt32S4tBwP3Mt16cPHXEPUC9dlyqXcP5tps3wTAOIH5CEYXpE8ZbvvSXzTarFNINZHLX/QV61FXGj8VRc0vChuAX3mV/oFa+sQfKZcFoDbJ3rEF3sm6cOv/HI1kwS1Pl5Lv2tYazs9vEon2cX63tXdkV65j/Ox5rTDNTePVMMP6jbzkhzXgqGP1W1e6XPldtxBu4WzhrTHFlKkwzsGO8xHJnz4EjW/IxwAz9btl3tT/koxK+6a0DZ84lZrxegtRdcpOQUDLQlQKSmHCjYcue2iN8iLj7zD/nYD/GXjWCI+x5y8coR3iqDAVx2cGtafhyKf1A67GhKNWUBII0A== X-MS-Office365-Filtering-Correlation-Id: e1adc32b-070d-4526-4c04-08d43b1e5774 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CY1PR02MB1413; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1413; 3:0KdfqY0PrKWCfhv30P9b8Tx38E1HXlljIu6DB9yabg6CEJ1nzQfcrqNQqZd99ugIHZfQWpvqL6WTgOYT1aSeRdzVIBMqiGP/Pa0nSlN7t2D+EYeaX7efSHaUGwbL7wrRHQNPMfbSW+hAphiTWYDWoDRdMeEaYkB5Lc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UEFFsMmC0WBFr3N+hPZx+0AwViBjmHjQDn+745tZVL X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1413; 31:vd5jTNTlmgj/cK9geC5kx8D0DAkXokR5T3Od+KxjzIHOBX5I9aDHbCP5loW4xZzk1sHPMjOBhl7ybjzS1Hh/6dilSW8ErCIrqr4ZJK1Z4WuzagZAKiiwHh6Z4TJglEWrvsOWNJ3R8L2g0aBs0VU5jQWLr89tY8YwRVNj8blSN3A396/uvEubpZ2ggDcFXG+JaP23WqCKw/Q62n+qkSWQp2ba3aTTvdIEnFyImV0d7RuBj9BBNmShH1MSayN7Hhs/27g1p0d7NbPYXkd8mQAzwi5VyWx47paWAsw9HQ9o88o=; 20:HI4gdqwnmHafqn9mBFP1k2z5QEdq584sHgCMUalfXRJuaMERnAm6eGgiIfBS9AtmhlR/wqoxcjGNlZXPY0R6VvZkpp9JHck6Vlm57RgQW2Ca93XbiVum00KNll6OR+GHarYtOKmgKt4WfSsEXK1FlUMu3wHcf12ndBai25EPSbDWVVcNI2Hw+SNj3lyXsa+VneQraRFRX4IOUCPwHK3Uqx43peZFhQtx1ulmq1rMWvZSa03UdjzjHOn2VHujur8IpluEssijOyQLOGAhtSqnNYyeReNGgTZrAG0pIZ9uO8/LdsF/i1vLzyUvNVGBmnSgcHNGC6VHj6WYo7PFMggj+skFrE9nqrOsJYSu1YP1JCHDKsNEmM5F5tpnNhQEeV99wESwtOjMWMUa/kzw3F6h/y0obgEtbalr4iM/8+VnYnUUfbW6lefZcoYG0w2gPKBxnogPm5S+LZs+DdNJGl7UjuzsaK5M85p/X1ko67sdFREpjQMPy6tzGRO8jnoyjQ7z X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(146099531331640)(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:CY1PR02MB1413; BCL:0; PCL:0; RULEID:; SRVR:CY1PR02MB1413; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1413; 4:P3Oq7FSu+Tf1czSUq2/o7MWB0JlNG+9QTYzz+gt1RUHEqR7P/BWe77hqBcE8Zq/8nN8qmzZb+nclki2+i7Lm7rotZ2UAt7PQdZvgara4yA+nViBxHe3b6XLB3kLRMH8NQWe5Qt+NKszIx4oZXokfjBmvyjMIy0PLjVNZYRIMINxFgzIJkbLaQrIWNKIjWxciAJqopAJFdr/uReK4pN6ax3z6KVg2yimSri5TO3zFvP0jxYu9DHbHPtHBZujLyhD+JP++flajGe36K/PVenD6cLiunUXCE0jRI2f0N87CquFy6Y7Tr6rx1b5EFLzSB2MXP0yL10KfPIQK77vLG+yD71b9H2/nuxILV37aY4dy6pO/DuEcNbUlQUJhqKdRsFTHE1fMz4VaqOzShvtMEVLlfGi01lUWrdoQMYCNuJKzpVpXtFqwe3EWF6as28GVS9ncuqGuQXoxpTt9mZYSdrg7Er2fgbukvMxPYIPJdY97xbVriUg6YR6O4coDhCuX+mlim8ad9KHOfx7CIap9t01ATa1mduRru0sPzH22CRCvBn+JpmADENIRahHQOreUsJNjzg+tYeEpewRPdAfGfRBrLe5OACx0KCXMdagyvZlif43bGlnTAJ0w5F2pcVRut6+57IQVw60NUO0bMNOib9F4ArXbgBUKM0MNkuFLUVJVkj7KO+WIv427t9slhmyVAPWHx+BZwUAM2HgpzwSbsVbEHufjbkEQN8TSYn5gGy2Gm4xJLcalVfTchMASqKoio4BB X-Forefront-PRVS: 018577E36E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR02MB1413; 23:7jI8ScTCb/mlz1CRu5jEUAw7l91jUiOlIMMHdY+mX?= =?us-ascii?Q?ggliFjn4JGbFIeIJyI9fCA/iJw0fKriV7nCrpEVtcx0wh3qmWm71kKNnt23y?= =?us-ascii?Q?GQscjjhnwmCYXGGdN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nKViW66cbw?= =?us-ascii?Q?YfDGWl9kV6WNLe26mZolaaJZDABKIl0b6gVtHZH+o5IKkucaFZj24xtofZFF?= =?us-ascii?Q?bGwqYPro4qva70SCggXD+80R/gEBUl9IgyLh9mu94ILzASyQnOy5wgeFG5ui?= =?us-ascii?Q?hcOXSIoIRiS6FpysZSejaQF7m8Si6sTszQy4hzRjzoCD++1KQrCQA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1413; 6:c18owWM8hlmfGxi5UtUyAwgH6rq/bDJsPv6jP7rl+6GiprX7PHPh4wIeSggWerSjKDoi9Xq74f84wkW0ivr0MdFMxuTD/sH8q3OWtiuaQsKycLOLweGUoXomOy0YdFDZuewBDcsK7DngZcdFiNscqOL/Nt4uOHWR3kQsSziV4y7anCc1EmqTBHKEkIyQtIUeOI2aHHrX13wqO+Pwg/fdGK266agRXQYuD6zJqlWJfKNNpdDiUl6CYX7TU53a/DqAxbwg29rzJpVbqEYHYYd4vFgYFdt3x6TB0M2ABl9YL/FkhAMvqyw+Xf8FcFXbwR9+2U8May5l3dsP0sb34u376GV+7P8nE28U/8a3vCe46fCyo0jRqLu1bZFimsHW0n/yWoJuIVI4wX2tnXSEpx5hrOPXs4vyvR1T33Tw31qnq9LxljOmRKzSbsHXFjSnw5TE262opD9VC9klfPzu+xAxvQ==; 5:t1uW0hHkMGkDMqeSmd53a23bfipdL0S92z2tYpwk04HPKBhOSw+/0wUMMwBLliI2r8y3JBFFoEaDDnGCIctKodpuyH2oDaVfMv9SOBD8e96/WATLZPWL2vSvDlV7cJDySpgUz/4LTmyTpKHwc28puQ==; 24:5XT+jXuNccEVyyJga1EvW7/IW4Z+w7YPC4MtsF07L47twjxdgze2nB5zxaBDjwxQyBYpSyhGs7YPDKmWPsPd2e0WuaOf/+n2UADFni1v0bQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1413; 7:aCKlFCqPEbZsfa8E1HaZYUSZauC6yDmDKl4PeT17yMpm7J/C/IOv3jdJ2qiJUOQXOBd0i4iIPkr3dxqlbLqiIICUT6dEZeERTz7eX/HoQvz0t9eINDuj0iKMt/PG78bxm/Qn/g8zL/waTwAePoSJEjnvz4SVqKq1gFoBMNrKQV1Al8AvV81q7QF5il5ufCV660hRiHg40fIYaePcBhjN2qrhmVBCkPBMxz8FHa+Fp0+QCCOPkKCVZYweY8gtb6OATFBS6BEGQ4in67wchsulca0Ap4FpbDDVwM+5NHjke7sTXw/5VLmq3e4SzeQ2HNpEzv8NtRVh5JJjyNaX0ROk5S3ZyzugWqIyXo4KqqPjP33IyvnXq43kf27+qPJOchbdC4cIrkEj8tDQH0ZSD4bySTsbrQPNpQlwdZ7k3Arxzw9rp1p7gmdb3AWlhToKTKjAzW7ac75SUn7I+Nz4T6fOoA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 19:08:06.4947 (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: CY1PR02MB1413 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: Santosh Shilimkar Acked-by: Santosh Shilimkar --- net/rds/ib.h | 39 --------------------------------------- net/rds/ib_cm.c | 42 ++++++++++++++++++++++-------------------- net/rds/ib_fmr.c | 10 +++++----- net/rds/ib_frmr.c | 12 ++++++------ net/rds/ib_rdma.c | 13 ++++++------- net/rds/ib_recv.c | 19 +++++++++---------- net/rds/ib_send.c | 50 +++++++++++++++++++++++++------------------------- 7 files changed, 73 insertions(+), 112 deletions(-) diff --git a/net/rds/ib.h b/net/rds/ib.h index d21ca88ab628..02e5fe8d6af8 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h @@ -275,45 +275,6 @@ struct rds_ib_statistics { extern struct workqueue_struct *rds_ib_wq; -/* - * Fake ib_dma_sync_sg_for_{cpu,device} as long as ib_verbs.h - * doesn't define it. - */ -static inline void rds_ib_dma_sync_sg_for_cpu(struct ib_device *dev, - struct scatterlist *sglist, - unsigned int sg_dma_len, - int direction) -{ - struct scatterlist *sg; - unsigned int i; - - for_each_sg(sglist, sg, sg_dma_len, i) { - ib_dma_sync_single_for_cpu(dev, - ib_sg_dma_address(dev, sg), - ib_sg_dma_len(dev, sg), - direction); - } -} -#define ib_dma_sync_sg_for_cpu rds_ib_dma_sync_sg_for_cpu - -static inline void rds_ib_dma_sync_sg_for_device(struct ib_device *dev, - struct scatterlist *sglist, - unsigned int sg_dma_len, - int direction) -{ - struct scatterlist *sg; - unsigned int i; - - for_each_sg(sglist, sg, sg_dma_len, i) { - ib_dma_sync_single_for_device(dev, - ib_sg_dma_address(dev, sg), - ib_sg_dma_len(dev, sg), - direction); - } -} -#define ib_dma_sync_sg_for_device rds_ib_dma_sync_sg_for_device - - /* ib.c */ extern struct rds_transport rds_ib_transport; struct rds_ib_device *rds_ib_get_client_data(struct ib_device *device); diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 5b2ab95afa07..a6d3726ea27d 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -456,31 +456,32 @@ static int rds_ib_setup_qp(struct rds_connection *conn) goto out; } - ic->i_send_hdrs = ib_dma_alloc_coherent(dev, - ic->i_send_ring.w_nr * + ic->i_send_hdrs = dma_alloc_coherent(dev->dma_device, + ic->i_send_ring.w_nr * sizeof(struct rds_header), - &ic->i_send_hdrs_dma, GFP_KERNEL); + &ic->i_send_hdrs_dma, GFP_KERNEL); if (!ic->i_send_hdrs) { ret = -ENOMEM; - rdsdebug("ib_dma_alloc_coherent send failed\n"); + rdsdebug("dma_alloc_coherent send failed\n"); goto out; } - ic->i_recv_hdrs = ib_dma_alloc_coherent(dev, - ic->i_recv_ring.w_nr * + ic->i_recv_hdrs = dma_alloc_coherent(dev->dma_device, + ic->i_recv_ring.w_nr * sizeof(struct rds_header), - &ic->i_recv_hdrs_dma, GFP_KERNEL); + &ic->i_recv_hdrs_dma, GFP_KERNEL); if (!ic->i_recv_hdrs) { ret = -ENOMEM; - rdsdebug("ib_dma_alloc_coherent recv failed\n"); + rdsdebug("dma_alloc_coherent recv failed\n"); goto out; } - ic->i_ack = ib_dma_alloc_coherent(dev, sizeof(struct rds_header), + ic->i_ack = dma_alloc_coherent(dev->dma_device, + sizeof(struct rds_header), &ic->i_ack_dma, GFP_KERNEL); if (!ic->i_ack) { ret = -ENOMEM; - rdsdebug("ib_dma_alloc_coherent ack failed\n"); + rdsdebug("dma_alloc_coherent ack failed\n"); goto out; } @@ -781,22 +782,23 @@ void rds_ib_conn_path_shutdown(struct rds_conn_path *cp) /* then free the resources that ib callbacks use */ if (ic->i_send_hdrs) - ib_dma_free_coherent(dev, - ic->i_send_ring.w_nr * + dma_free_coherent(dev->dma_device, + ic->i_send_ring.w_nr * sizeof(struct rds_header), - ic->i_send_hdrs, - ic->i_send_hdrs_dma); + ic->i_send_hdrs, + ic->i_send_hdrs_dma); if (ic->i_recv_hdrs) - ib_dma_free_coherent(dev, - ic->i_recv_ring.w_nr * + dma_free_coherent(dev->dma_device, + ic->i_recv_ring.w_nr * sizeof(struct rds_header), - ic->i_recv_hdrs, - ic->i_recv_hdrs_dma); + ic->i_recv_hdrs, + ic->i_recv_hdrs_dma); if (ic->i_ack) - ib_dma_free_coherent(dev, sizeof(struct rds_header), - ic->i_ack, ic->i_ack_dma); + dma_free_coherent(dev->dma_device, + sizeof(struct rds_header), + ic->i_ack, ic->i_ack_dma); if (ic->i_sends) rds_ib_send_clear_ring(ic); diff --git a/net/rds/ib_fmr.c b/net/rds/ib_fmr.c index 4fe8f4fec4ee..150e8f756bd9 100644 --- a/net/rds/ib_fmr.c +++ b/net/rds/ib_fmr.c @@ -100,7 +100,7 @@ int rds_ib_map_fmr(struct rds_ib_device *rds_ibdev, struct rds_ib_mr *ibmr, int i, j; int ret; - sg_dma_len = ib_dma_map_sg(dev, sg, nents, DMA_BIDIRECTIONAL); + sg_dma_len = dma_map_sg(dev->dma_device, sg, nents, DMA_BIDIRECTIONAL); if (unlikely(!sg_dma_len)) { pr_warn("RDS/IB: %s failed!\n", __func__); return -EBUSY; @@ -110,8 +110,8 @@ int rds_ib_map_fmr(struct rds_ib_device *rds_ibdev, struct rds_ib_mr *ibmr, page_cnt = 0; for (i = 0; i < sg_dma_len; ++i) { - unsigned int dma_len = ib_sg_dma_len(dev, &scat[i]); - u64 dma_addr = ib_sg_dma_address(dev, &scat[i]); + unsigned int dma_len = sg_dma_len(&scat[i]); + u64 dma_addr = sg_dma_address(&scat[i]); if (dma_addr & ~PAGE_MASK) { if (i > 0) @@ -140,8 +140,8 @@ int rds_ib_map_fmr(struct rds_ib_device *rds_ibdev, struct rds_ib_mr *ibmr, page_cnt = 0; for (i = 0; i < sg_dma_len; ++i) { - unsigned int dma_len = ib_sg_dma_len(dev, &scat[i]); - u64 dma_addr = ib_sg_dma_address(dev, &scat[i]); + unsigned int dma_len = sg_dma_len(&scat[i]); + u64 dma_addr = sg_dma_address(&scat[i]); for (j = 0; j < dma_len; j += PAGE_SIZE) dma_pages[page_cnt++] = diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c index d921adc62765..2d44bf11d97f 100644 --- a/net/rds/ib_frmr.c +++ b/net/rds/ib_frmr.c @@ -169,8 +169,8 @@ static int rds_ib_map_frmr(struct rds_ib_device *rds_ibdev, ibmr->sg_dma_len = 0; frmr->sg_byte_len = 0; WARN_ON(ibmr->sg_dma_len); - ibmr->sg_dma_len = ib_dma_map_sg(dev, ibmr->sg, ibmr->sg_len, - DMA_BIDIRECTIONAL); + ibmr->sg_dma_len = dma_map_sg(dev->dma_device, ibmr->sg, ibmr->sg_len, + DMA_BIDIRECTIONAL); if (unlikely(!ibmr->sg_dma_len)) { pr_warn("RDS/IB: %s failed!\n", __func__); return -EBUSY; @@ -182,8 +182,8 @@ static int rds_ib_map_frmr(struct rds_ib_device *rds_ibdev, ret = -EINVAL; for (i = 0; i < ibmr->sg_dma_len; ++i) { - unsigned int dma_len = ib_sg_dma_len(dev, &ibmr->sg[i]); - u64 dma_addr = ib_sg_dma_address(dev, &ibmr->sg[i]); + unsigned int dma_len = sg_dma_len(&ibmr->sg[i]); + u64 dma_addr = sg_dma_address(&ibmr->sg[i]); frmr->sg_byte_len += dma_len; if (dma_addr & ~PAGE_MASK) { @@ -221,8 +221,8 @@ static int rds_ib_map_frmr(struct rds_ib_device *rds_ibdev, return ret; out_unmap: - ib_dma_unmap_sg(rds_ibdev->dev, ibmr->sg, ibmr->sg_len, - DMA_BIDIRECTIONAL); + dma_unmap_sg(rds_ibdev->dev->dma_device, ibmr->sg, ibmr->sg_len, + DMA_BIDIRECTIONAL); ibmr->sg_dma_len = 0; return ret; } diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index 977f69886c00..9f5acba71a05 100644 --- a/net/rds/ib_rdma.c +++ b/net/rds/ib_rdma.c @@ -221,12 +221,12 @@ void rds_ib_sync_mr(void *trans_private, int direction) switch (direction) { case DMA_FROM_DEVICE: - ib_dma_sync_sg_for_cpu(rds_ibdev->dev, ibmr->sg, - ibmr->sg_dma_len, DMA_BIDIRECTIONAL); + dma_sync_sg_for_cpu(rds_ibdev->dev->dma_device, ibmr->sg, + ibmr->sg_dma_len, DMA_BIDIRECTIONAL); break; case DMA_TO_DEVICE: - ib_dma_sync_sg_for_device(rds_ibdev->dev, ibmr->sg, - ibmr->sg_dma_len, DMA_BIDIRECTIONAL); + dma_sync_sg_for_device(rds_ibdev->dev->dma_device, ibmr->sg, + ibmr->sg_dma_len, DMA_BIDIRECTIONAL); break; } } @@ -236,9 +236,8 @@ void __rds_ib_teardown_mr(struct rds_ib_mr *ibmr) struct rds_ib_device *rds_ibdev = ibmr->device; if (ibmr->sg_dma_len) { - ib_dma_unmap_sg(rds_ibdev->dev, - ibmr->sg, ibmr->sg_len, - DMA_BIDIRECTIONAL); + dma_unmap_sg(rds_ibdev->dev->dma_device, ibmr->sg, ibmr->sg_len, + DMA_BIDIRECTIONAL); ibmr->sg_dma_len = 0; } diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index 606a11f681d2..32bc2df27e5a 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c @@ -225,7 +225,8 @@ static void rds_ib_recv_clear_one(struct rds_ib_connection *ic, recv->r_ibinc = NULL; } if (recv->r_frag) { - ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE); + dma_unmap_sg(ic->i_cm_id->device->dma_device, + &recv->r_frag->f_sg, 1, DMA_FROM_DEVICE); rds_ib_frag_free(ic, recv->r_frag); recv->r_frag = NULL; } @@ -331,8 +332,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn, if (!recv->r_frag) goto out; - ret = ib_dma_map_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, - 1, DMA_FROM_DEVICE); + ret = dma_map_sg(ic->i_cm_id->device->dma_device, &recv->r_frag->f_sg, + 1, DMA_FROM_DEVICE); WARN_ON(ret != 1); sge = &recv->r_sge[0]; @@ -340,8 +341,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn, sge->length = sizeof(struct rds_header); sge = &recv->r_sge[1]; - sge->addr = ib_sg_dma_address(ic->i_cm_id->device, &recv->r_frag->f_sg); - sge->length = ib_sg_dma_len(ic->i_cm_id->device, &recv->r_frag->f_sg); + sge->addr = sg_dma_address(&recv->r_frag->f_sg); + sge->length = sg_dma_len(&recv->r_frag->f_sg); ret = 0; out: @@ -408,9 +409,7 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp) ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr); rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv, recv->r_ibinc, sg_page(&recv->r_frag->f_sg), - (long) ib_sg_dma_address( - ic->i_cm_id->device, - &recv->r_frag->f_sg), + (long)sg_dma_address(&recv->r_frag->f_sg), ret); if (ret) { rds_ib_conn_error(conn, "recv post on " @@ -968,8 +967,8 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic, rds_ib_stats_inc(s_ib_rx_cq_event); recv = &ic->i_recvs[rds_ib_ring_oldest(&ic->i_recv_ring)]; - ib_dma_unmap_sg(ic->i_cm_id->device, &recv->r_frag->f_sg, 1, - DMA_FROM_DEVICE); + dma_unmap_sg(ic->i_cm_id->device->dma_device, &recv->r_frag->f_sg, 1, + DMA_FROM_DEVICE); /* Also process recvs in connecting state because it is possible * to get a recv completion _before_ the rdmacm ESTABLISHED diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index 84d90c97332f..aa79b6aa488e 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c @@ -74,9 +74,8 @@ static void rds_ib_send_unmap_data(struct rds_ib_connection *ic, int wc_status) { if (op->op_nents) - ib_dma_unmap_sg(ic->i_cm_id->device, - op->op_sg, op->op_nents, - DMA_TO_DEVICE); + dma_unmap_sg(ic->i_cm_id->device->dma_device, op->op_sg, + op->op_nents, DMA_TO_DEVICE); } static void rds_ib_send_unmap_rdma(struct rds_ib_connection *ic, @@ -84,9 +83,9 @@ static void rds_ib_send_unmap_rdma(struct rds_ib_connection *ic, int wc_status) { if (op->op_mapped) { - ib_dma_unmap_sg(ic->i_cm_id->device, - op->op_sg, op->op_nents, - op->op_write ? DMA_TO_DEVICE : DMA_FROM_DEVICE); + dma_unmap_sg(ic->i_cm_id->device->dma_device, op->op_sg, + op->op_nents, op->op_write ? DMA_TO_DEVICE : + DMA_FROM_DEVICE); op->op_mapped = 0; } @@ -106,7 +105,7 @@ static void rds_ib_send_unmap_rdma(struct rds_ib_connection *ic, * handling in the ACK processing code. * * Note: There's no need to explicitly sync any RDMA buffers using - * ib_dma_sync_sg_for_cpu - the completion for the RDMA + * dma_sync_sg_for_cpu - the completion for the RDMA * operation itself unmapped the RDMA buffers, which takes care * of synching. */ @@ -125,8 +124,8 @@ static void rds_ib_send_unmap_atomic(struct rds_ib_connection *ic, { /* unmap atomic recvbuf */ if (op->op_mapped) { - ib_dma_unmap_sg(ic->i_cm_id->device, op->op_sg, 1, - DMA_FROM_DEVICE); + dma_unmap_sg(ic->i_cm_id->device->dma_device, op->op_sg, 1, + DMA_FROM_DEVICE); op->op_mapped = 0; } @@ -546,10 +545,10 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm, /* map the message the first time we see it */ if (!ic->i_data_op) { if (rm->data.op_nents) { - rm->data.op_count = ib_dma_map_sg(dev, - rm->data.op_sg, - rm->data.op_nents, - DMA_TO_DEVICE); + rm->data.op_count = dma_map_sg(dev->dma_device, + rm->data.op_sg, + rm->data.op_nents, + DMA_TO_DEVICE); rdsdebug("ic %p mapping rm %p: %d\n", ic, rm, rm->data.op_count); if (rm->data.op_count == 0) { rds_ib_stats_inc(s_ib_tx_sg_mapping_failure); @@ -640,16 +639,16 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm, if (i < work_alloc && scat != &rm->data.op_sg[rm->data.op_count]) { len = min(RDS_FRAG_SIZE, - ib_sg_dma_len(dev, scat) - rm->data.op_dmaoff); + sg_dma_len(scat) - rm->data.op_dmaoff); send->s_wr.num_sge = 2; - send->s_sge[1].addr = ib_sg_dma_address(dev, scat); + send->s_sge[1].addr = sg_dma_address(scat); send->s_sge[1].addr += rm->data.op_dmaoff; send->s_sge[1].length = len; bytes_sent += len; rm->data.op_dmaoff += len; - if (rm->data.op_dmaoff == ib_sg_dma_len(dev, scat)) { + if (rm->data.op_dmaoff == sg_dma_len(scat)) { scat++; rm->data.op_dmasg++; rm->data.op_dmaoff = 0; @@ -797,7 +796,8 @@ int rds_ib_xmit_atomic(struct rds_connection *conn, struct rm_atomic_op *op) rds_message_addref(container_of(send->s_op, struct rds_message, atomic)); /* map 8 byte retval buffer to the device */ - ret = ib_dma_map_sg(ic->i_cm_id->device, op->op_sg, 1, DMA_FROM_DEVICE); + ret = dma_map_sg(ic->i_cm_id->device->dma_device, op->op_sg, 1, + DMA_FROM_DEVICE); rdsdebug("ic %p mapping atomic op %p. mapped %d pg\n", ic, op, ret); if (ret != 1) { rds_ib_ring_unalloc(&ic->i_send_ring, work_alloc); @@ -807,8 +807,8 @@ int rds_ib_xmit_atomic(struct rds_connection *conn, struct rm_atomic_op *op) } /* Convert our struct scatterlist to struct ib_sge */ - send->s_sge[0].addr = ib_sg_dma_address(ic->i_cm_id->device, op->op_sg); - send->s_sge[0].length = ib_sg_dma_len(ic->i_cm_id->device, op->op_sg); + send->s_sge[0].addr = sg_dma_address(op->op_sg); + send->s_sge[0].length = sg_dma_len(op->op_sg); send->s_sge[0].lkey = ic->i_pd->local_dma_lkey; rdsdebug("rva %Lx rpa %Lx len %u\n", op->op_remote_addr, @@ -861,9 +861,10 @@ int rds_ib_xmit_rdma(struct rds_connection *conn, struct rm_rdma_op *op) /* map the op the first time we see it */ if (!op->op_mapped) { - op->op_count = ib_dma_map_sg(ic->i_cm_id->device, - op->op_sg, op->op_nents, (op->op_write) ? - DMA_TO_DEVICE : DMA_FROM_DEVICE); + op->op_count = dma_map_sg(ic->i_cm_id->device->dma_device, + op->op_sg, op->op_nents, + op->op_write ? DMA_TO_DEVICE : + DMA_FROM_DEVICE); rdsdebug("ic %p mapping op %p: %d\n", ic, op, op->op_count); if (op->op_count == 0) { rds_ib_stats_inc(s_ib_tx_sg_mapping_failure); @@ -920,9 +921,8 @@ int rds_ib_xmit_rdma(struct rds_connection *conn, struct rm_rdma_op *op) for (j = 0; j < send->s_rdma_wr.wr.num_sge && scat != &op->op_sg[op->op_count]; j++) { - len = ib_sg_dma_len(ic->i_cm_id->device, scat); - send->s_sge[j].addr = - ib_sg_dma_address(ic->i_cm_id->device, scat); + len = sg_dma_len(scat); + send->s_sge[j].addr = sg_dma_address(scat); send->s_sge[j].length = len; send->s_sge[j].lkey = ic->i_pd->local_dma_lkey;