From patchwork Thu May 19 15:11:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 9127787 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 E3B1060213 for ; Thu, 19 May 2016 15:13:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D73EB281BC for ; Thu, 19 May 2016 15:13:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBB25281C3; Thu, 19 May 2016 15:13:18 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 62499281BC for ; Thu, 19 May 2016 15:13:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b3Pbr-0001A6-PB; Thu, 19 May 2016 15:11:35 +0000 Received: from mail-by2on0095.outbound.protection.outlook.com ([207.46.100.95] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b3Pbo-000170-A2 for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2016 15:11:33 +0000 Received: from BN3PR0301CA0084.namprd03.prod.outlook.com (10.160.152.180) by BLUPR03MB470.namprd03.prod.outlook.com (10.141.78.142) with Microsoft SMTP Server (TLS) id 15.1.492.11; Thu, 19 May 2016 15:11:10 +0000 Received: from BY2FFO11FD029.protection.gbl (2a01:111:f400:7c0c::174) by BN3PR0301CA0084.outlook.office365.com (2a01:111:e400:401e::52) with Microsoft SMTP Server (TLS) id 15.1.497.12 via Frontend Transport; Thu, 19 May 2016 15:11:09 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none 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 BY2FFO11FD029.mail.protection.outlook.com (10.1.14.212) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Thu, 19 May 2016 15:11:09 +0000 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.77.120]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u4JFB6Hw006873; Thu, 19 May 2016 08:11:07 -0700 From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Herbert Xu Subject: [PATCH v3 3/8] arm64: add io{read,write}64be accessors Date: Thu, 19 May 2016 18:11:04 +0300 Message-ID: <1463670664-2856-1-git-send-email-horia.geanta@nxp.com> X-Mailer: git-send-email 2.4.4 In-Reply-To: <1463670405-1059-1-git-send-email-horia.geanta@nxp.com> References: <1463670405-1059-1-git-send-email-horia.geanta@nxp.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131081442694659681; (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)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(50466002)(5820100001)(86362001)(5008740100001)(81166006)(11100500001)(8676002)(8936002)(85426001)(50986999)(47776003)(50226002)(76176999)(23676002)(19580395003)(77096005)(19580405001)(104016004)(36756003)(92566002)(229853001)(110136002)(6806005)(2950100001)(1220700001)(105606002)(106466001)(4326007)(2870700001)(33646002)(87936001)(586003)(189998001)(2906002)(142933001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB470; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD029; 1:v877kX195N3ANCAyhKLnP4f/L/zPunlCFlpGCDCGyFR6PaV6ohTXT7iyKoGupXCDCkuj9kTl/Rm9D2iN+ivdlKpUv+64rvsXBV/mdqnGY47QIP8Yf4n/TxC1TorCHEAup5n+WeIH2OUcPeOzQSGaKUl6BGa2urxHUm6Otlm+dazslXiiDAFBnF0RTse9cK1Evw3sNv1DcMvf5J636WR6tuwj2Uy5Us4ppzzGKnSiX4YJluxYQaTbJI8EBBlCPZtzMWIGElYPEHxNAL3iLu/4pMF9C7lKNdFF+G7aDYgcZjdwYGRPpfiGwNv9KaRk8GfkDHbZG2hQhKxmlsxvESykeifiytIHMFekwx0yG4A6B7eRvPpRt2YhdJJO+79LQsa+1SQxjtYtv4/NlHZvyu+3+eGN9UA1cVaWwTWqb4bhVhVZPVOiyuvZKT84quy1crBJjQC0SJqRjqHXQb2oeYfNYJTRY4KPoFvYY1sAE3eR67aeNwtV4yqsKg4W+DnH32i/IKc7w9+so5OWe9Z1xlfQOnEJlOOm9GK0UabB/FABono0tvu6IHQx1HZ4nPkbXA15lBpKmvadWnIGn86fh/oPFQ== X-MS-Office365-Filtering-Correlation-Id: f6346420-e103-4890-fe61-08d37ff7ceec X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB470; 2:5gu6y/+NSxW50c5L7IXN5f6Hu4QC//v/0E+pZ9mnIaHmYWYU5LGJ8kJsZVKuPgO8yCo2dmPnEKtvZ+uMdA7ZtqPCV812SSH/srNiSltJQxlrqcKKNqoa8Go0IyORsR1LKLF238G0NhwwmzDfGKRxAM2NYU87wmNvG87dbmrKJE6z2EkTdPAt/1p5dnf/Xx1T; 3:yX9EyZl7IiLj5oVwZaWHppyC7R5OLu37HbA2aF8wxfsG73kv+RNu7Gm0PObE7YK4CqOFiB6qTOF18sBR8ASQbCPBK39rfqy02oRq2Z9SARdb+64f7I3Ks0UuRtUHzBgd+gJwQBvLwE2PDuSKXShhRDVEuoz2bw1nVzP2jTkD8O5MbiHNKcb0ydins8tzpsL6XzZCytsgYSOnXGoPfz99onzdecec0phYXxWG4256icE= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB470; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB470; 25:dLywqYo26Qm05R/QlpH9NpzW+VADRhkCcT16GdJHBXgm54Qo03hGbsK0zLBTkgWnVTLZdz/T9T48T0rSWL2rv64X6Qun+PY2CCJiPDNMHE3P9qwZvF3csL27wzpdSDqOvz01ouj1rtffi1/o62T+AboTR7oSZYYaY+ApKoCt7mbSg6iSeJG7iNl9LI0r9ZQzHz/580fDTYoWRDFEYNd6rffqju4/RaF2oameJHsl7lOtWFYZye2GuqrPov5z6E6uRwD4KbFBTmc+z36lDRTat8RlONznjMQmN/dd58El7ptADEoBTuGVKV5joJHigrlF4U8jQG3wo8W/8AeN4LgQ57BhTUtMdwct0gLjg3zhMpWUL58iHBptZuwIrZwe+KGh2e4Rd0Su6c4foxlC5CmSItRv6RLx3y8N7r5lwLcogTe+L4ASAtmtSTqEf6LlKOIqLUZY15Z+JcgAezjcTtmgzmCEmS1PhbT8euSDcc/oIl7Rea11bUr/8v9ncyRd9jta652SxbiCgG8MxrXY+0gw8NNG9azLZqgw/SnzddZ7H5Vwof55PlsE6FHnXjwbN4Hoi1kfIc8TGo1UMLqMVjMoG8StIMxqMitOpSNLW+leDJstgJtAW2S6ZGT15YgN3Q+/Ney94J75IAYGXV5YjCWL6ff277Fj18VW5W0iNcK1ERU5XzF0aH5nMZQFwVTZf4PH6eok60CcNLsJq/FpIFUUcA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(13024025)(13018025)(13015025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BLUPR03MB470; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB470; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB470; 4:4CAXId5qzvj8Xdl99B9oUZ5aCqowvOtVE4x/G0Ol//dy5gdTvyhUUJnW2jmCGMnRg0dtObtkiwGzYsfVHzQ8P2f2+/lRdi9kWParQZ+z7lQwx1myHP9BqlABQ2fBT8nkp9xr55b9u6l2E3f8Y19J3AKxkX7ICp1BwtUSHNOfHPT/ycc13RLVOzHZ/Ov/8nnuDDATkYmxHd397NA8RKn0gl6vYgA6WyRz/REdB6LvTLfoOpHGOdX5AiaZLlayjm009CXFaWMlgc6DBBECVF5lA/1GBC7rx3Z1zMIHCodnPjM+5hB1gkERM1heIND9H0rzJRRROKMeMx6WdJRUmd5yu6Ug1iXsbUr4eERSicaqodOhRaXo92lrg3D5fAER7zjNdKsxYarLim6YbYZYKK7484P6Jnkj9vhRehvBgZhl9bS19oXJbBKn2yosgoR1NED04TTs8S69IpDUUZMRIgGMswIWPSyGKhft0ijacTXVNmY= X-Forefront-PRVS: 094700CA91 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjAzTUI0NzA7MjM6Zkt5QWthUDdDY0Y5YUJLRlRzdW5WazAxOFZa?= =?utf-8?B?bzR5NHllQzFadmlnM0NoMGdaVk1WKzR2elhpdjJsSTBFTklPNTkzMHZHcFdh?= =?utf-8?B?KzVEK1Y0VHpFa2xBZDdKc1ZRbEtUY3VGcHRHRm5nbk9wNHE5YmswYzUvbGxY?= =?utf-8?B?S1FaYVppN1hxUzltRXVFaWJiQ3pqTnhwZlU5aW1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-CrossTenant-OriginalArrivalTime: 19 May 2016 15:11:09.3411 (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: BLUPR03MB470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160519_081132_447091_FB316F70 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "David S. Miller" 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 This will allow device drivers to consistently use io{read,write}XXbe also for 64-bit accesses. Acked-by: Catalin Marinas Signed-off-by: Alex Porosanu Signed-off-by: Horia Geantă --- arch/arm64/include/asm/io.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 44be1e03ed65..9b6e408cfa51 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h @@ -174,13 +174,15 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); #define iounmap __iounmap /* - * io{read,write}{16,32}be() macros + * io{read,write}{16,32,64}be() macros */ #define ioread16be(p) ({ __u16 __v = be16_to_cpu((__force __be16)__raw_readw(p)); __iormb(); __v; }) #define ioread32be(p) ({ __u32 __v = be32_to_cpu((__force __be32)__raw_readl(p)); __iormb(); __v; }) +#define ioread64be(p) ({ __u64 __v = be64_to_cpu((__force __be64)__raw_readq(p)); __iormb(); __v; }) #define iowrite16be(v,p) ({ __iowmb(); __raw_writew((__force __u16)cpu_to_be16(v), p); }) #define iowrite32be(v,p) ({ __iowmb(); __raw_writel((__force __u32)cpu_to_be32(v), p); }) +#define iowrite64be(v,p) ({ __iowmb(); __raw_writeq((__force __u64)cpu_to_be64(v), p); }) /* * Convert a physical pointer to a virtual kernel pointer for /dev/mem