From patchwork Wed Jul 19 11:42:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 9851753 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 61DD5602C8 for ; Wed, 19 Jul 2017 11:48:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4983A27F2B for ; Wed, 19 Jul 2017 11:48:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B2EF2864F; Wed, 19 Jul 2017 11:48:07 +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=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE2A227F2B for ; Wed, 19 Jul 2017 11:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YTDVo3I0LUC9NQv7m3+MhcaxtCG3dnEJc8BjgwmTY44=; b=tcI1+r4mKE66vj tIr1jw5u60bW+Za0UFbturJPBu1ltnzNfADYStnlOUNklG13ZwZmKwdVkVglLyBtQo3f1aBsZpsaS Hapi1qV8uFwIqVlO45J4vCs3bbalnLZWQ/SwRrIghyoNlyhhcD8we/Afa+Y1j0qLRPoBxGcPBTrxx mzrGL+HG7taxzjhifpGVt4P+26qDVlHtFh3S+x7vwLrt+INmBmmT5/nddHV/dsU3YEKICVicLxE/i cOMPEBnZlb8jSNFCkE/Nmg7I/Ldk+Y5SV/pYV7rwr1M3TCRDy5kL3391Xq6feUyclCt2QJMEWLmqf MEsBg7lMcLHV+SlwiE5g==; 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 1dXnSW-0004kL-Po; Wed, 19 Jul 2017 11:48:04 +0000 Received: from mail-dm3nam03on0077.outbound.protection.outlook.com ([104.47.41.77] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXnO6-00014Q-T1 for linux-arm-kernel@lists.infradead.org; Wed, 19 Jul 2017 11:43:48 +0000 Received: from CY1PR03CA0031.namprd03.prod.outlook.com (2603:10b6:600::41) by DM2PR0301MB0911.namprd03.prod.outlook.com (2a01:111:e400:501d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 19 Jul 2017 11:43:08 +0000 Received: from BN1AFFO11FD015.protection.gbl (2a01:111:f400:7c10::163) by CY1PR03CA0031.outlook.office365.com (2603:10b6:600::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10 via Frontend Transport; Wed, 19 Jul 2017 11:43:08 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD015.mail.protection.outlook.com (10.58.52.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1240.9 via Frontend Transport; Wed, 19 Jul 2017 11:43:07 +0000 Received: from fsr-fed1964-102.ea.freescale.net (fsr-fed1964-102.ea.freescale.net [10.171.73.86]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v6JBgYMg007825; Wed, 19 Jul 2017 04:43:02 -0700 From: To: , Subject: [PATCH v3 6/8] staging: fsl-mc: don't use raw device io functions Date: Wed, 19 Jul 2017 14:42:30 +0300 Message-ID: <20170719114232.8347-7-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170719114232.8347-1-laurentiu.tudor@nxp.com> References: <20170719114232.8347-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131449381880223993; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39410400002)(39850400002)(39400400002)(39380400002)(39860400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(43544003)(189002)(199003)(9170700003)(8936002)(54906002)(105606002)(86152003)(47776003)(2950100002)(6666003)(106466001)(2906002)(6306002)(38730400002)(50226002)(36756003)(53936002)(5003940100001)(1076002)(8656003)(39060400002)(305945005)(8676002)(189998001)(86362001)(2876002)(81166006)(50986999)(76176999)(356003)(77096006)(5660300001)(966005)(498600001)(626005)(7416002)(33646002)(4326008)(104016004)(69596002)(48376002)(85426001)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0911; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1AFFO11FD015; 1:XcJ8Oxj5VhXCKgCw1ywJQB2Wx0bCeFcQAg1SIelM7?= =?us-ascii?Q?jmBXO7+pUwQNRaOZbGxVFTUxYkFz8XEUMVk7cC2s0i+ZX7gS7hPx3xAKX4Bq?= =?us-ascii?Q?leX5S++nYoYKPma4ZfOESh8dUD2V4CQald8Ua4HDs7HtfzNfthqEgH+Izd5q?= =?us-ascii?Q?VwfK4tGNnyNDyWR3MVIs53xSp5eJj1DWx2N3A8Sf9WHTJPdtRV5iZkvb9Bf8?= =?us-ascii?Q?ah8GXNt2ch38IRcvF5DEYfiPKp553T4/0QkK4z/FG/dt9G+ztpK0OG5x6urI?= =?us-ascii?Q?pL4kQicMLiw9HaO26NHj1+RPgNzsm+APMaiVWMNnSjqCGkL54zIhcgujz71D?= =?us-ascii?Q?Bx+KQrEbdQu6TnqcaV64ILT/782qg6vFir/zmcQpNK5u/MeKqpegADCjuWZh?= =?us-ascii?Q?cTbfyUI34csXk8OQiaO/sMeBb2dqDJgV5OyxzDZ195g3tqi0Uz4m/Eg7J2cN?= =?us-ascii?Q?GC7Mvh3TzcnmiejyCeWBLgS17JX5IUOBHwfU3rcs6D8a1avJ6uT5bBj5VlDD?= =?us-ascii?Q?mqBKAcOAN2lpMi3aEpv55TLcd1YOyShLZ9QFdA5J3duZ8jEOjKC9VvlXtLXM?= =?us-ascii?Q?IeYmcVMBbtgmlmz18He4Co0a+nF9WLTuBvrE6rzVgSy14U/o/khss++HsArY?= =?us-ascii?Q?px/HfNIxLpY1CJGER/uLe4B3zuDjvmgUTSShMawqgBL1TBiR4Mxs8OQZWksT?= =?us-ascii?Q?re+5Tki3ASgdxpCAHoP1UNAm3AjpA77m5EJiWxwV1Y//X7pq5L+RbsTqsV5C?= =?us-ascii?Q?9utK0uuo76zA4Mb86hPSEoz+65Wlcx1jrgveRG5e74ohcps8tq0GkT9naEUc?= =?us-ascii?Q?K3kuPaHnqmx/PCaIIvud0NdgV9Jk+cdMDB/KuUbVvmJ+oznPKX8jWDBoLB0X?= =?us-ascii?Q?1LNv0oGQ6gY5+ZhMhh0+CeGuVHZHI20zKLt5k2IGT39RItTyLx/lI+6pPU7n?= =?us-ascii?Q?U/1C12nXwmPmQJruNbG1Zq7b+BRjqS6+FYr2SeQcGIqJ4bDkekf14KGrXdeP?= =?us-ascii?Q?KZsrAncv7/sTYZwmzzaZL3COE7JNLOnxb74hEMkIwi9FjnhvBUd3bDpAZOFr?= =?us-ascii?Q?mmrfz0=3D?= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c77715c-573c-4f07-f79a-08d4ce9b535e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR0301MB0911; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0911; 3:8l5OJ5W2SUiKsRxfXRfcca7Ic1DZDNi/4cMcmLgcsTbpAM2pzKYndXgbz0kidcE6nJUbgvcVdDUcPu5EQkEYFIg+mao+P4wCXzxyIvsvvPExASDVTEmKKkQwjnym9WFNLMfOg0NvJsXd4jkE/66Ut+7MoQde0GCxJ+VP7tkoolJFxGmxo4hQnM5LuruUPzuQgp5DuLh87o2NtAx+L64o/OW1O9qo5MyrFfAlxWZDvljVQLIcKG2GF83IGAuzmP+7MCazh/Nd9JpytjuLqE6zf4O/w01c/PPUjKwJx87pHxxDkd/dEj7RoOxmKYo2X2UEcaAfY9cNXs8rNSwizFS9tCXxZX0EPemcNzK6dCjvzEaP5cDNH26F+xaMKIymfS4UMmf6OLJTdNV3lxT/VX0SJbLvoWyOOu6dtAGJASVxA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Pa1A5HK95mJR7tZxWpPC8cKyJQ/qZosg/wS8Uvg2/TiDLRgtcVqq4/ X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(185117386973197)(275809806118684); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(2017060910075)(13018025)(13016025)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123565025)(20161123559100)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0301MB0911; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0301MB0911; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0911; 4:Ff8MOtg56UgE8HCaF4Vm4mLGQRspS/fpFZ1M4kJA?= =?us-ascii?Q?66vfXAq+iG1HCrib0P924msQi8AlWUq5V0s8LDMwZ75bF35v2uawtEh/eemh?= =?us-ascii?Q?cDmKEV2l7HsxooQdLeo4Qfw3osTeH5cmV0NFJQWLvd6Hq20MhyfAngmLtb+2?= =?us-ascii?Q?hERfz3pwIdqyiNYYgSkhb01C3glUMKe85QiomWZj1vRSh1H9zJBUkK+edg9m?= =?us-ascii?Q?9Fd0udmFOkoBTrhuWe7d1faPOjdTpLK6KFYN3U7yl48YWlsBPkf27s+jTSCz?= =?us-ascii?Q?F90eUEICa1lpP2oYQJPpr4UgsReSHOPSXEiX0RbE2rcMQlGTpnwJYo3DYRy7?= =?us-ascii?Q?P+JMbxLR+gYV9GmkuoPJgvrgfR/hO4lUxrodDCuyBsjQYuUZGnd5bhawVlfZ?= =?us-ascii?Q?b/+nTEI/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zZDRS?= =?us-ascii?Q?R97PEcS8eQfZHuT1Pzew8JcQciP60uIMapwv1zQxuvtEemXvidr57DCENtOX?= =?us-ascii?Q?wzux0g=3D=3D?= X-Forefront-PRVS: 0373D94D15 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0911; 23:cIMUCjvVpVMGHWDOPpAcW60xzPBbpkmfjTkh+46?= =?us-ascii?Q?Td3eLdGRODoBfJFWwb9Y0TW22W0jc0ob8/xj0rgoUYGp3pRaTX/JUVoLt0i+?= =?us-ascii?Q?GJ2pttCywZhLazgbdiDIR0x34Y9fsGrzamvoNUVJWnf6WfnKtPOVzM+D3ivP?= =?us-ascii?Q?2Op3rGUIA1igyGZCP45uU8SEq74F9+SF7jCTXieVVbd6hT4F40jq7yZBZpMv?= =?us-ascii?Q?Rx3p8QuzFeGUXWh3axD3Ser/Dfj3iZcGNdlECelPoUtME9IH+u3GngGumL00?= =?us-ascii?Q?tFxdNeXD9g/dknqoAh0PNa1W9EvB7ZlA1hqpab+8if8akiJ9crMCJscnRO/b?= =?us-ascii?Q?f0+ED462ghTqmmu3O+MB4dFdydTa1VjDbvh1ra0ySB5ycwXp53s7FNuWfjan?= =?us-ascii?Q?UeyLgzEZS6XHJz6OQQIDN6UUmIwA6ppcMXIcc8zUMMIDMmyz5BkuV7J+o9Os?= =?us-ascii?Q?0joLWIEKUkv8gfp6f3MniFF6h8+x8RKSBXlKZMuKAnx1fkvxjyvIoZOwYuTO?= =?us-ascii?Q?+eIjgyHbfFi3i+lLNogT43SkphUwbYmuOHxL72zto2RkiHxOv1KcTVk15Ljo?= =?us-ascii?Q?d54BCTHmNPvFVe3xzHeaA3btahaOpIkTbPICuEX61kf6oGZFJ1NgUH9nZNgN?= =?us-ascii?Q?krwUhYi9J1gNnaAlzqRfJytU+NFm2IW1oghnbrtss5ZUEL4N7hMmuxzphzus?= =?us-ascii?Q?cWt4Fl555uhSbkkX0KscJqqeU6b5xnC3u4NNQFVynomF5CrbAb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PwLvxIgkOZHsoLIYflbJLa8gqw0zD3jZTDGYtJFI5y/8z1YvACJsGuUNOXCQKunVne8isZHW6uYt5xZ5VYXtPOcBlEHju1qubmnw8E7+gtadxkMr2iAvnlW9cCalaqZ8X1t/JNbPJpV3F9WeX11k25Z5Hpr3x7NHJA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2017 11:43:07.7104 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0911 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170719_044331_332644_D2457EA8 X-CRM114-Status: UNSURE ( 3.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, ruxandra.radulescu@nxp.com, arnd@arndb.de, marc.zyngier@arm.com, bharat.bhushan@nxp.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, catalin.horghidan@nxp.com, ioana.ciornei@nxp.com, leoyang.li@nxp.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurentiu Tudor As raw device io functions are not portable and don't handle byte-order (triggering suspicion that endianness isn't handled well) switch to using the standard api. Since MC expects LE byte-order and the upper layers already take care of that, we need to trick the device io api by doing a LE -> CPU conversion just before calling it. This way, the CPU -> LE conversion done in the api puts the data back in the right byte-order. Obviously, for reads the extra step is mirrored: there's a CPU -> LE conversion following the API call. Signed-off-by: Laurentiu Tudor Acked-by: Arnd Bergmann --- Notes: -v3 -no changes -v2 -new patch replacing https://lkml.org/lkml/2017/7/17/419 drivers/staging/fsl-mc/bus/mc-sys.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c index 195d9f3..8a6dc47 100644 --- a/drivers/staging/fsl-mc/bus/mc-sys.c +++ b/drivers/staging/fsl-mc/bus/mc-sys.c @@ -126,12 +126,15 @@ static inline void mc_write_command(struct mc_command __iomem *portal, /* copy command parameters into the portal */ for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++) - __raw_writeq(cmd->params[i], &portal->params[i]); - /* ensure command params are committed before submitting it */ - wmb(); + /* + * Data is already in the expected LE byte-order. Do an + * extra LE -> CPU conversion so that the CPU -> LE done in + * the device io write api puts it back in the right order. + */ + writeq_relaxed(le64_to_cpu(cmd->params[i]), &portal->params[i]); /* submit the command by writing the header */ - __raw_writeq(cmd->header, &portal->header); + writeq(le64_to_cpu(cmd->header), &portal->header); } /** @@ -151,14 +154,20 @@ static inline enum mc_cmd_status mc_read_response(struct mc_command __iomem * enum mc_cmd_status status; /* Copy command response header from MC portal: */ - resp->header = __raw_readq(&portal->header); + resp->header = cpu_to_le64(readq_relaxed(&portal->header)); status = mc_cmd_hdr_read_status(resp); if (status != MC_CMD_STATUS_OK) return status; /* Copy command response data from MC portal: */ for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++) - resp->params[i] = __raw_readq(&portal->params[i]); + /* + * Data is expected to be in LE byte-order. Do an + * extra CPU -> LE to revert the LE -> CPU done in + * the device io read api. + */ + resp->params[i] = + cpu_to_le64(readq_relaxed(&portal->params[i])); return status; }