From patchwork Wed Jan 11 22:28: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: 714026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tzNpc5lYjz9t1H for ; Thu, 12 Jan 2017 09:28:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sandiskcorp.onmicrosoft.com header.i=@sandiskcorp.onmicrosoft.com header.b="fFa2Jyp3"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cRRO3-0003gZ-9D; Wed, 11 Jan 2017 22:28:55 +0000 Received: from mail-by2nam03on0080.outbound.protection.outlook.com ([104.47.42.80] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cRRNw-0003et-Dw; Wed, 11 Jan 2017 22:28:53 +0000 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=pqUKpznQKvh8KwFkrMH2UFMEiyW0QNPo4lp7XdOT4bg=; b=fFa2Jyp3YbfXztKthz0S/k1zCtsKOYr9kyjC68L1d8ucmCkjzjn4YLVn85RG+wM01QkPhCk+I2YEzP/R9rS1EeQPejbxPM/hw9LKTrcVCsESz/quXjLG0tbpdMPDoz3RnDDxJCQbtNuiJofweHa5rRXkGpDyYZ86Ou8dpbf/aPM= Received: from BY2PR02CA0017.namprd02.prod.outlook.com (10.242.32.17) by BY2PR02MB1412.namprd02.prod.outlook.com (10.162.80.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Wed, 11 Jan 2017 22:28:17 +0000 Received: from BN1BFFO11FD014.protection.gbl (2a01:111:f400:7c10::1:131) by BY2PR02CA0017.outlook.office365.com (2a01:111:e400:2c2a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Wed, 11 Jan 2017 22:28:16 +0000 Authentication-Results: spf=pass (sender IP is 74.221.232.54) smtp.mailfrom=sandisk.com; arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=bestguesspass action=none header.from=sandisk.com;arm.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 74.221.232.54 as permitted sender) receiver=protection.outlook.com; client-ip=74.221.232.54; helo=sacsmgep14.sandisk.com; Received: from sacsmgep14.sandisk.com (74.221.232.54) by BN1BFFO11FD014.mail.protection.outlook.com (10.58.144.77) 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; Wed, 11 Jan 2017 22:28:11 +0000 X-AuditID: ac1c2133-0c3ff70000013ebf-7c-58772c46dff8 Received: from SACHUBIP01.sdcorp.global.sandisk.com (Unknown_Domain [172.28.1.254]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id DA.6C.16063.64C27785; Wed, 11 Jan 2017 23:12:09 -0800 (PST) Received: from SACCASIP04.sdcorp.global.sandisk.com (10.181.10.113) by SACHUBIP01.sdcorp.global.sandisk.com (10.181.10.103) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 11 Jan 2017 14:28:08 -0800 Received: from ULS-OP-MBXIP03.sdcorp.global.sandisk.com ([fe80::f9ec:1e1b:1439:62d8]) by SACCASIP04.sdcorp.global.sandisk.com ([::1]) with mapi id 14.03.0319.002; Wed, 11 Jan 2017 14:28:07 -0800 From: Bart Van Assche To: "gregkh@linuxfoundation.org" Subject: Re: [PATCH 2/9] Move dma_ops from archdata into struct device Thread-Topic: [PATCH 2/9] Move dma_ops from archdata into struct device Thread-Index: AQHSbFn6ItxJjPbhik+C656I6OUbBw== Date: Wed, 11 Jan 2017 22:28:05 +0000 Message-ID: <1484173670.2619.28.camel@sandisk.com> References: <20170111005648.14988-1-bart.vanassche@sandisk.com> <20170111005648.14988-3-bart.vanassche@sandisk.com> <20170111064803.GB26893@kroah.com> <1484158589.2619.14.camel@sandisk.com> <20170111203100.GB17895@kroah.com> In-Reply-To: <20170111203100.GB17895@kroah.com> Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA22Te0ybVRjGPd+duiafyOWITh3xEsfGnJL4ximZicrHHypGl+DiZXV8ATJu aRFlRkOAAaVTuwkYWsLoQAYM2q4413JxrCNsDIEOCOMqAwqssnAR3RhMsO0HBhP/e97nPL/3 fc9JDkf6tnBBXHxSqqhMUiQEMzKq9jG0tjty1+fRzy/2yEBtW2XhijmDgfnK4wg0p88wYLi3 QkNJdzYFY38MI5jLXKXA1b1Ag8Y4wUJO0WswPdRMQIUrHLLKTQwUnQuE5b+yKCi7uA/ujBsQ 1PbkMDBmrKFhxq4j4X7xAgFqvZmFKe0IA3OjrQh0F0cpsEz209Cq1xJQddZIwny2lYGFvDka ehtKGDjjrCPdo3Ip0BaeZGHimoOAztIrDEzbv3F7hiwSSu4XkHBspI6A6s46FuyFzQhW767R 0NNSRsD6D/UITJeGKcjXTTFgUfcy0Fx4E0FGexUNTasfQqelmoB6SyEJtx2/UXC+Y54E1+JV CpbNkzSMnWwm9u8TnJdKCeFYs5YRaktrkdDbf50UbhijhJ+qBwnBphtlhYXFj4X6qp1CeZOL ECw1akYoMzlpoUu/QAlzXV2sYLXMEoL9ch6Keuag7JUYMSE+TVTuCT8ki+vUGKiUHxfJL07P OqkM9O0kmY98OMyH4cuDK0Q+knG+fAWBT1V0s1LRjbDDlIOkog1hzXcnWQ/C8C9gvbaJ8mg/ /lV8olJDekIk/zvG51rV7oLjHubfxMdNaVImAhu7cjfyobjXaaM9muKfxvrvLawnLnf3VE89 Ls1yIWy9OuTN+/B7sPPevDeD+O04e/ZBj03ygXjIeYqQbuCHx693MJL2x67JNVrST+KlqjVG yr+L/7w94L2xnH8Itxc7ve19+Wdx+0gdqUUBui1tdVsQ3RZE8kPxQGEBI+mXce8JLSnpEFxp mHVrzq1jcG52nGS/j8sd15DO+0BjCBc3rKNNNnPwwsasHbhAM85K+hBuKLJu+FG4zThGSfAQ wo1WK7sJ990pZv4P7sks31giCjvqjkrsMMJ5BTX/Lt1xIfM/bBnyr0EBKsVhVWKsmLI3LFSl SIqJVx0JPZycaEHev7zjRStaM0fYEc+h4G1yoTEt2pdWpKnSE+3oKXejCfNZBwqikpKTxGA/ +adm97E8RpF+VFQmf6L8LEFU2dGjHBUcKH+ipfGALx+rSBWPiGKKqNw8JTifoAxUQ5vku3MM ma19t9b7dv1ynlqNmMl944FtQ/UHnGGPHPxoaqZb+4Hh69ilBlvq9pf+9n/PgkPCXeFt2b82 vRP2pTmyK6gyIjTnqxVL6nJk+bLu5v5bS4G2139ezLihT5+Jfm4uQJb2FrE8k+dcuds/EGh5 Oy9euzRNhRf4hARFxw/axGBKFafYu5NUqhT/AFIGyTTTBAAA X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.54; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(39840400002)(39860400002)(39850400002)(39410400002)(2980300002)(438002)(3190300001)(189002)(199003)(377424004)(24454002)(1730700003)(5250100002)(5000100001)(7416002)(4326007)(7366002)(7406005)(5890100001)(84326002)(39060400001)(110136003)(4810100001)(2351001)(106116001)(106466001)(4610100001)(8676002)(6916009)(568964002)(103116003)(81156014)(68736007)(2950100002)(512934002)(2906002)(92566002)(2476003)(69596002)(7736002)(305945005)(356003)(2900100001)(5640700003)(81166006)(54906002)(36756003)(33646002)(8936002)(93886004)(76176999)(189998001)(229853002)(97736004)(30436002)(50986999)(575784001)(2501003)(86362001)(2270400002)(99936001)(5660300001)(6116002)(54356999)(3846002)(626004)(8666007)(38730400001)(102836003)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1412; H:sacsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD014; 1:Y7znxDCrDyFA2o5/LvLAYOV9wVeusc0AcAGckYmoM5zdyCt6HvR8ERdSCdMjo2a/AayniQ5YiOlfXZVvHYza98m3QRvwNLsz7UY5IAXmzU5thsBm9fNb7GrEmitmxldtIU1DeENgVibTfBrHlM21dXln81ysiwAwmTh2/V4+bgLdm0dGDIgINHoXCkKueDIJzeH6hi3n3UOIUALIMhCcmZVxszli/f0rVe0z7xvBSpVFRnUYVH50J+3f5yjRSbu+lveI0qXl8mKo2KvD7a+tB1JcZbJ0rUp/Izg5Kb3TwbeUQmV53D17UKU6vV13QmkjaC9wATwkEgOagTBkr6LlSByPucQzJmRDLO3N8js40J+O+oS4FjGd4QFaGI/0BZ/unCJ8TGZoqbPqUo2IZmyR5YhCNhHPMFI0L5eCQv/C3jY4CdL8I9c9My3VWax37GJH4PE6L3XLSjm/C6aBrQHxJawuhMqgrwGKvRthHU4i43NeIplEUGuSd575Gw0JVQChydlF9aKHTZVddkE4ngHgab6CvwDVOQ0za2zgLExYms9r4kIXRZqO2hb+lEqCoqmrk5dOzKbnmQAS0zK6YN18wuKnwwkqGZEe51pa9mwqTp/IONJkD0TQSPAjPIshXwOn X-MS-Office365-Filtering-Correlation-Id: 3201744c-c6cf-4be0-f70d-08d43a71232f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB1412; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1412; 3:X+O49coAzSXgAFVBuiT4YZzWBl7oyxQGhrtQVY7oUCjwxe2s9xSczs7vJxKt3UYReTBgtoqE1idVsJPZpN526V2zElTMWnnb+276k2HIoXGVTeR6OEWIdGgH5d3EqKkHS+UNMTOs16BOs+3dc0Uu6ofEG8qaZ+DGIZ0hjqaFjRGX0EECL+uKCspSPZCNJ4lMld2pHEH5GliNq+OA/tpRIqPGWPvPyGMOOYN2fUysh7+SUYHr0Dq4yV1zyxa0iNUme9HbgojC/kfxMX8I4r9FZ7To+fEqh0TGBY7L1NGmAiiDCmGlwFMdBZu6Ktslp0kHiH6QmClVb9t7hlChcrs2ngPDyvkEWvMBxsl4wZvuPd25rf3GoGiq82mIdNRvQZuzAX65kX2vym2ZHHaFYqLbHg==; 25:r34AoHEVAhvif0aceBH+N9H1GJ3uiz94PCXaI7/L3BVvd5qA/fZNH/ibu0/2FKRuMp9EFbp+OCL9wjFglNwSGRgdudwRSELUFNQDUnOZDUEay2+v2rxMes4HrIGDTM8trYAW5lw9FAwC0R7/6iqZz3G9QTtGbn9A0DxJXHKT7htrAIkSE9++eD3rKMpHjGDUP99i1gcg32wrudhhG9QMwVlEq/f+50aHLBmXi8YviOlqZ4FepLWYUjbHCFMM0TdSDsFacnexKX/cu2az8cRfg1wGZ/fHOF5WeN9pWnOE5lFv/q3CfEYGI2RFO8A5FgY6jeGC0hJTUhFr+TWi58BRWNqG5CSN7arKM1xwlkxAV6oFLdhRNf99KUq399yberdXMKbofU0iy2UQWdAxjI9wf0+00Y8ZXfkDoRyNTggSTHTod2j6nQHtBCc7Es2l80jOVOhmmw/Gc5CtduX4WAi7rqx07jVeLdjziz+dgrCRfSq0Qga1LyeYVO80NENGSsW2sf/iezQACovtKkQUEGwRZw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1412; 31:0IozkLRid0DncS6kCPscY3o38iEGzgYoY8qYs4FJmPZWrJYgeBZ08IF9Bc1ko0MXacqLhQ+9BzmIRFlg1A5mjywPrbXetwdvypyA0mmrEt8RX/9zBwawMFjXPVv20Cf4/0KSp2x1pfiDMOb8xCVBqptzd22LS5/TZv58b2XuatF2YcHvibM2ez/pBYZ49Vr+WjFeia3LkphW6OSbQma02tsXyqzgGMaVrMa94QbfZHljy5Kybe1ewbpDM3R7N+YMOQXXvHkiJl/2D7WystTT4RyAu/2zOOFafdvyQWcrCJDBunf+iVPcV2T/pcWAaZmG; 20:Q5SBaKLy9eY/CceiaGygdoG95rD9+jAEffEqzwDYU74ky0dm1ibtV/zErWhB+TJHdpxY9Y2CUDYgRLy5U1Efn4XHzJADRRiL+VPuA1qVaHkIoEW3hWBIMBjOc4YAU7C+TAazl3UjrAQ6o14MW++80ociytfPprMipPTXGVUUo648CvaUx4TOh+7oKlG9zq395B8T1XRzgNKptX1vm/zx8N5fkrjmjAL6aTtfjDr4CIR8IUNMMpgwImEl0vbDSbawSGCGQpLJ8AM/1Z/nfsFRKCgb/KqyM8ZzV0V1rQCk7Zv2qvJQRbOu+T44/miEJH+Q1ckTs471+9SJxmZ4q5IoaWf9RHQp4isOEBoUfwsFOWlnDtM0Gpd4cr6vMMoKfefU6zPhMhzJzvKUZtSGxTOH9ZZETaEQn08Ht3lpoKP1iOe+XKRQhXJi4a+nJfBxtbXUBHrIJN4XXP3gNjokE/qct/iWafNk0KRPVFiCzzBla1otNYdQyNFq6i2/16aA6LR7 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:BY2PR02MB1412; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB1412; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1412; 4:S4TsZcsPvMRd7USHPki/saExPWaC/f5/oFprb+fmTowL0CXwwqoZvsi/yCXaaZqCf+veeeBm9G/fmbTtveXBsRTeASBm+zUvRq1zvnncIox10fFZy5jMw+2g2omXO3y2Y3mOgct/X0eJ4PwPah1wG2/x8F4JrQ5WYgWnjDKW2AXUdKaTpbIK7IsLJqqTfzFEBvN0epCpe+cCEgKiITs8vW6ZK86JjHMc9/QfUUBJahfNHjV100uy/5911T2X5flwRI1SiICSqBoem6TBhlXFy3wmPCDtqOL3s1+6ZZ+lGztwc4vZZcSbT3tMTIHU5DrX3WvhapJnusW794l6pLnixXYTj75gsPM7NY2THK5+BGhcW2kCMPgSUJTwYrlBUD/IwzNZmkyzZo9vwKgEaq7L+jS3zjZ8h7XidhG/LBVCe0AnKx1Yyd4sNvyGNQBI6BYZbM2l0OtnMmuQfE+QtGFXPFg1lAWqVT1KS8cy47/0LIpCnAiTs11XNuZDAd6OCpJpcZWOjsxQs3QZS4+HEa7YFsAC2H2rmUhwc9NhKyqNu6tvJXGPU3NP44gwBwyAN1A1Qt8rlFMiuY9u1JlfU8hG25V96zOd/990iuSrtKSJuVhh7PfngVswadKNf/xFfVp4R6sGdnO+fdz+DyAz76UdE+iUEl90AtfryRI66eNVO4Mfz76zzLaHdSV/UxmrQFPm0mU9bVms+kaInbLwWlyt6My/0WLwDRDWKAiypuUQ104JXXhfKHBFdR1vsG556d6m X-Forefront-PRVS: 01842C458A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR02MB1412; 23:OhIPfjLQYK2Ba4Bg9v4PDN+09CNFIzIxwNWH8AjGP?= =?us-ascii?Q?wKoUCiDAl3RyxphQ13H7VYFXUkiLNGaZ9VRh9Y5jrrQ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Fu6Lt/rlpodaQ2eSTXZR3R56QI4WP83gHBdl5C9XBA/yenlhVJws/xh2EAftfAm3IqkSG7ZydFLyrXV/768Yra7GowxM1h2K61XXy40FoxL66WNPoNs46bhPEtFQKSkebV9FnnNCFKR3Gkyty2966B49A== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2017 22:28:11.0040 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[74.221.232.54]; Helo=[sacsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB1412 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170111_142848_575650_B4D00D08 X-CRM114-Status: UNSURE ( 5.22 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [104.47.42.80 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [104.47.42.80 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-mips@linux-mips.org" , "dalias@libc.org" , "linux-ia64@vger.kernel.org" , "a-jacquiot@ti.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "x86@kernel.org" , "mulix@mulix.org" , "dhowells@redhat.com" , "jcmvbkbc@gmail.com" , "hpa@zytor.com" , "sparclinux@vger.kernel.org" , "tglx@linutronix.de" , "egtvedt@samfundet.no" , "jonas@southpole.se" , "linux-s390@vger.kernel.org" , "jesper.nilsson@axis.com" , "linux-am33-list@redhat.com" , "linux-c6x-dev@linux-c6x.org" , "ysato@users.sourceforge.jp" , "linux-rdma@vger.kernel.org" , "linux-hexagon@vger.kernel.org" , "deller@gmx.de" , "linux-sh@vger.kernel.org" , "linux@armlinux.org.uk" , "dledford@redhat.com" , "mingo@redhat.com" , "geert@linux-m68k.org" , "linux-pci@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , "jejb@parisc-linux.org" , "hskinnemoen@gmail.com" , "uclinux-h8-devel@lists.sourceforge.jp" , "linux-xtensa@linux-xtensa.org" , "jdmason@kudzu.us" , "adi-buildroot-devel@lists.sourceforge.net" , "stefan.kristiansson@saunalahti.fi" , "starvik@axis.com" , "linux-m68k@lists.linux-m68k.org" , "openrisc@lists.librecores.org" , "lftan@altera.com" , "shorne@gmail.com" , "linux-metag@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "chris@zankel.net" , "tony.luck@intel.com" , "linux-parisc@vger.kernel.org" , "linux-cris-kernel@axis.com" , "geoff@infradead.org" , "linux-kernel@vger.kernel.org" , "fenghua.yu@intel.com" , "iommu@lists.linux-foundation.org" , "msalter@redhat.com" , "linux-alpha@vger.kernel.org" , "nios2-dev@lists.rocketboards.org" , "linuxppc-dev@lists.ozlabs.org" , "davem@davemloft.net" , "joro@8bytes.org" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Wed, 2017-01-11 at 21:31 +0100, gregkh@linuxfoundation.org wrote: > That's a big sign that your patch series needs work. Break it up into > smaller pieces, it should be possible, which will make merges easier > (well, different in a way.) Hello Greg, Can you have a look at the attached patches? These three patches are a splitup of the single patch at the start of this e-mail thread. Thanks, Bart. From 99788e97937d3f729947cd02e98457d642b8f115 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 11 Jan 2017 13:49:08 -0800 Subject: [PATCH 3/3] treewide: Consolidate get_dma_ops() implementations Introduce a new architecture-specific get_arch_dma_ops() function. Add get_dma_ops() in . Signed-off-by: Bart Van Assche --- arch/alpha/include/asm/dma-mapping.h | 2 +- arch/arc/include/asm/dma-mapping.h | 2 +- arch/arm/include/asm/dma-mapping.h | 4 ++-- arch/arm64/include/asm/dma-mapping.h | 4 ++-- arch/avr32/include/asm/dma-mapping.h | 2 +- arch/blackfin/include/asm/dma-mapping.h | 2 +- arch/c6x/include/asm/dma-mapping.h | 2 +- arch/cris/include/asm/dma-mapping.h | 4 ++-- arch/frv/include/asm/dma-mapping.h | 2 +- arch/h8300/include/asm/dma-mapping.h | 2 +- arch/hexagon/include/asm/dma-mapping.h | 5 +---- arch/ia64/include/asm/dma-mapping.h | 5 ++++- arch/m32r/include/asm/dma-mapping.h | 4 +--- arch/m68k/include/asm/dma-mapping.h | 2 +- arch/metag/include/asm/dma-mapping.h | 2 +- arch/microblaze/include/asm/dma-mapping.h | 2 +- arch/mips/include/asm/dma-mapping.h | 7 ++----- arch/mn10300/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/dma-mapping.h | 2 +- arch/openrisc/include/asm/dma-mapping.h | 2 +- arch/parisc/include/asm/dma-mapping.h | 2 +- arch/powerpc/include/asm/dma-mapping.h | 7 ++----- arch/powerpc/include/asm/ps3.h | 2 +- arch/s390/include/asm/dma-mapping.h | 4 +--- arch/sh/include/asm/dma-mapping.h | 2 +- arch/sparc/include/asm/dma-mapping.h | 4 ++-- arch/tile/include/asm/dma-mapping.h | 7 ++----- arch/unicore32/include/asm/dma-mapping.h | 2 +- arch/x86/include/asm/dma-mapping.h | 9 +-------- arch/xtensa/include/asm/dma-mapping.h | 7 ++----- include/linux/dma-mapping.h | 7 +++++++ 31 files changed, 48 insertions(+), 64 deletions(-) diff --git a/arch/alpha/include/asm/dma-mapping.h b/arch/alpha/include/asm/dma-mapping.h index d3480562411d..5d53666935e6 100644 --- a/arch/alpha/include/asm/dma-mapping.h +++ b/arch/alpha/include/asm/dma-mapping.h @@ -3,7 +3,7 @@ extern const struct dma_map_ops *dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return dma_ops; } diff --git a/arch/arc/include/asm/dma-mapping.h b/arch/arc/include/asm/dma-mapping.h index fdff3aa60052..94285031c4fb 100644 --- a/arch/arc/include/asm/dma-mapping.h +++ b/arch/arc/include/asm/dma-mapping.h @@ -20,7 +20,7 @@ extern const struct dma_map_ops arc_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &arc_dma_ops; } diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index c7432d647e53..716656925975 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -23,12 +23,12 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev) return &arm_dma_ops; } -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { if (xen_initial_domain()) return xen_dma_ops; else - return __generic_dma_ops(dev); + return __generic_dma_ops(NULL); } #define HAVE_ARCH_DMA_SUPPORTED 1 diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index 58ae36cc3b60..505756cdc67a 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h @@ -39,12 +39,12 @@ static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev) return &dummy_dma_ops; } -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { if (xen_initial_domain()) return xen_dma_ops; else - return __generic_dma_ops(dev); + return __generic_dma_ops(NULL); } void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, diff --git a/arch/avr32/include/asm/dma-mapping.h b/arch/avr32/include/asm/dma-mapping.h index b2b43c0e0774..7388451f9905 100644 --- a/arch/avr32/include/asm/dma-mapping.h +++ b/arch/avr32/include/asm/dma-mapping.h @@ -6,7 +6,7 @@ extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, extern const struct dma_map_ops avr32_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &avr32_dma_ops; } diff --git a/arch/blackfin/include/asm/dma-mapping.h b/arch/blackfin/include/asm/dma-mapping.h index 320fb50fbd41..04254ac36bed 100644 --- a/arch/blackfin/include/asm/dma-mapping.h +++ b/arch/blackfin/include/asm/dma-mapping.h @@ -38,7 +38,7 @@ _dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir) extern const struct dma_map_ops bfin_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &bfin_dma_ops; } diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index 88258b9ebc8e..aca9f755e4f8 100644 --- a/arch/c6x/include/asm/dma-mapping.h +++ b/arch/c6x/include/asm/dma-mapping.h @@ -19,7 +19,7 @@ extern const struct dma_map_ops c6x_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &c6x_dma_ops; } diff --git a/arch/cris/include/asm/dma-mapping.h b/arch/cris/include/asm/dma-mapping.h index aae4fbc0a656..256169de3743 100644 --- a/arch/cris/include/asm/dma-mapping.h +++ b/arch/cris/include/asm/dma-mapping.h @@ -4,12 +4,12 @@ #ifdef CONFIG_PCI extern const struct dma_map_ops v32_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &v32_dma_ops; } #else -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { BUG(); return NULL; diff --git a/arch/frv/include/asm/dma-mapping.h b/arch/frv/include/asm/dma-mapping.h index 150cc00544a8..354900917585 100644 --- a/arch/frv/include/asm/dma-mapping.h +++ b/arch/frv/include/asm/dma-mapping.h @@ -9,7 +9,7 @@ extern unsigned long __nongprelbss dma_coherent_mem_end; extern const struct dma_map_ops frv_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &frv_dma_ops; } diff --git a/arch/h8300/include/asm/dma-mapping.h b/arch/h8300/include/asm/dma-mapping.h index f804bca4c13f..847c7562e046 100644 --- a/arch/h8300/include/asm/dma-mapping.h +++ b/arch/h8300/include/asm/dma-mapping.h @@ -3,7 +3,7 @@ extern const struct dma_map_ops h8300_dma_map_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &h8300_dma_map_ops; } diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index b812e917cd95..d3a87bd9b686 100644 --- a/arch/hexagon/include/asm/dma-mapping.h +++ b/arch/hexagon/include/asm/dma-mapping.h @@ -34,11 +34,8 @@ extern int bad_dma_address; extern const struct dma_map_ops *dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - if (unlikely(dev == NULL)) - return NULL; - return dma_ops; } diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index 05e467d56d86..73ec3c6f4cfe 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h @@ -23,7 +23,10 @@ extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t, extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int, enum dma_data_direction); -#define get_dma_ops(dev) platform_dma_get_ops(dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) +{ + return platform_dma_get_ops(NULL); +} static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) { diff --git a/arch/m32r/include/asm/dma-mapping.h b/arch/m32r/include/asm/dma-mapping.h index 27b1597ac563..c01d9f52d228 100644 --- a/arch/m32r/include/asm/dma-mapping.h +++ b/arch/m32r/include/asm/dma-mapping.h @@ -10,10 +10,8 @@ #define DMA_ERROR_CODE (~(dma_addr_t)0x0) -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - if (dev && dev->dma_ops) - return dev->dma_ops; return &dma_noop_ops; } diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h index 863509939d5a..9210e470771b 100644 --- a/arch/m68k/include/asm/dma-mapping.h +++ b/arch/m68k/include/asm/dma-mapping.h @@ -3,7 +3,7 @@ extern const struct dma_map_ops m68k_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &m68k_dma_ops; } diff --git a/arch/metag/include/asm/dma-mapping.h b/arch/metag/include/asm/dma-mapping.h index c156a7ac732f..fad3dc3cb210 100644 --- a/arch/metag/include/asm/dma-mapping.h +++ b/arch/metag/include/asm/dma-mapping.h @@ -3,7 +3,7 @@ extern const struct dma_map_ops metag_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &metag_dma_ops; } diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h index c7faf2fb51d6..3fad5e722a66 100644 --- a/arch/microblaze/include/asm/dma-mapping.h +++ b/arch/microblaze/include/asm/dma-mapping.h @@ -38,7 +38,7 @@ */ extern const struct dma_map_ops dma_direct_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &dma_direct_ops; } diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index dad3b09fe993..aba71385f9d1 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -11,12 +11,9 @@ extern const struct dma_map_ops *mips_dma_map_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - if (dev && dev->dma_ops) - return dev->dma_ops; - else - return mips_dma_map_ops; + return mips_dma_map_ops; } static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) diff --git a/arch/mn10300/include/asm/dma-mapping.h b/arch/mn10300/include/asm/dma-mapping.h index 564e3927e005..737ef574b3ea 100644 --- a/arch/mn10300/include/asm/dma-mapping.h +++ b/arch/mn10300/include/asm/dma-mapping.h @@ -16,7 +16,7 @@ extern const struct dma_map_ops mn10300_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &mn10300_dma_ops; } diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h index aa00d839a64b..7b3c6f280293 100644 --- a/arch/nios2/include/asm/dma-mapping.h +++ b/arch/nios2/include/asm/dma-mapping.h @@ -12,7 +12,7 @@ extern const struct dma_map_ops nios2_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &nios2_dma_ops; } diff --git a/arch/openrisc/include/asm/dma-mapping.h b/arch/openrisc/include/asm/dma-mapping.h index 88acbedb4947..0c0075f17145 100644 --- a/arch/openrisc/include/asm/dma-mapping.h +++ b/arch/openrisc/include/asm/dma-mapping.h @@ -30,7 +30,7 @@ extern const struct dma_map_ops or1k_dma_map_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &or1k_dma_map_ops; } diff --git a/arch/parisc/include/asm/dma-mapping.h b/arch/parisc/include/asm/dma-mapping.h index 1749073e44fc..5404c6a726b2 100644 --- a/arch/parisc/include/asm/dma-mapping.h +++ b/arch/parisc/include/asm/dma-mapping.h @@ -27,7 +27,7 @@ extern const struct dma_map_ops pcx_dma_ops; extern const struct dma_map_ops *hppa_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return hppa_dma_ops; } diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 8275603ba4d5..181a095468e4 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h @@ -78,17 +78,14 @@ extern struct dma_map_ops dma_iommu_ops; #endif extern const struct dma_map_ops dma_direct_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { /* We don't handle the NULL dev case for ISA for now. We could * do it via an out of line call but it is not needed for now. The * only ISA DMA device we support is the floppy and we have a hack * in the floppy driver directly to get a device for us. */ - if (unlikely(dev == NULL)) - return NULL; - - return dev->dma_ops; + return NULL; } /* diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h index a19f831a4cc9..17ee719e799f 100644 --- a/arch/powerpc/include/asm/ps3.h +++ b/arch/powerpc/include/asm/ps3.h @@ -435,7 +435,7 @@ static inline void *ps3_system_bus_get_drvdata( return dev_get_drvdata(&dev->core); } -/* These two need global scope for get_dma_ops(). */ +/* These two need global scope for get_arch_dma_ops(). */ extern struct bus_type ps3_system_bus_type; diff --git a/arch/s390/include/asm/dma-mapping.h b/arch/s390/include/asm/dma-mapping.h index a872027d0c1b..3108b8dbe266 100644 --- a/arch/s390/include/asm/dma-mapping.h +++ b/arch/s390/include/asm/dma-mapping.h @@ -12,10 +12,8 @@ extern const struct dma_map_ops s390_pci_dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - if (dev && dev->dma_ops) - return dev->dma_ops; return &dma_noop_ops; } diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index a7382c34c241..d99008af5f73 100644 --- a/arch/sh/include/asm/dma-mapping.h +++ b/arch/sh/include/asm/dma-mapping.h @@ -4,7 +4,7 @@ extern const struct dma_map_ops *dma_ops; extern void no_iommu_init(void); -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return dma_ops; } diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 3d2babc0c4c6..69cc627779f2 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h @@ -24,14 +24,14 @@ extern const struct dma_map_ops pci32_dma_ops; extern struct bus_type pci_bus_type; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { #ifdef CONFIG_SPARC_LEON if (sparc_cpu_model == sparc_leon) return leon_dma_ops; #endif #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) - if (dev->bus == &pci_bus_type) + if (bus == &pci_bus_type) return &pci32_dma_ops; #endif return dma_ops; diff --git a/arch/tile/include/asm/dma-mapping.h b/arch/tile/include/asm/dma-mapping.h index 2562995a6ac9..bbc71a29b2c6 100644 --- a/arch/tile/include/asm/dma-mapping.h +++ b/arch/tile/include/asm/dma-mapping.h @@ -29,12 +29,9 @@ extern const struct dma_map_ops *gx_pci_dma_map_ops; extern const struct dma_map_ops *gx_legacy_pci_dma_map_ops; extern const struct dma_map_ops *gx_hybrid_pci_dma_map_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - if (dev && dev->dma_ops) - return dev->dma_ops; - else - return tile_dma_map_ops; + return tile_dma_map_ops; } static inline dma_addr_t get_dma_offset(struct device *dev) diff --git a/arch/unicore32/include/asm/dma-mapping.h b/arch/unicore32/include/asm/dma-mapping.h index 14d7729c7b73..518ba5848dd6 100644 --- a/arch/unicore32/include/asm/dma-mapping.h +++ b/arch/unicore32/include/asm/dma-mapping.h @@ -23,7 +23,7 @@ extern const struct dma_map_ops swiotlb_dma_map_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { return &swiotlb_dma_map_ops; } diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 94b5b96966cb..08a0838b83fb 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -27,16 +27,9 @@ extern int panic_on_overflow; extern const struct dma_map_ops *dma_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { -#ifndef CONFIG_X86_DEV_DMA_OPS return dma_ops; -#else - if (unlikely(!dev) || !dev->dma_ops) - return dma_ops; - else - return dev->dma_ops; -#endif } bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h index 9eecfc3c5dc4..c6140fa8c0be 100644 --- a/arch/xtensa/include/asm/dma-mapping.h +++ b/arch/xtensa/include/asm/dma-mapping.h @@ -20,12 +20,9 @@ extern const struct dma_map_ops xtensa_dma_map_ops; -static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - if (dev && dev->dma_ops) - return dev->dma_ops; - else - return &xtensa_dma_map_ops; + return &xtensa_dma_map_ops; } void dma_cache_sync(struct device *dev, void *vaddr, size_t size, diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index e97f23e8b2d9..ab8710888ddf 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -164,6 +164,13 @@ int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma, #ifdef CONFIG_HAS_DMA #include +static inline const struct dma_map_ops *get_dma_ops(struct device *dev) +{ + if (dev && dev->dma_ops) + return dev->dma_ops; + return get_arch_dma_ops(dev ? dev->bus : NULL); +} + static inline void set_dma_ops(struct device *dev, const struct dma_map_ops *dma_ops) { -- 2.11.0