From patchwork Wed Mar 1 19:19:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9599011 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 9829260453 for ; Wed, 1 Mar 2017 19:25:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 816C828552 for ; Wed, 1 Mar 2017 19:25:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7441F2855A; Wed, 1 Mar 2017 19:25:06 +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=ham 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 6767E28552 for ; Wed, 1 Mar 2017 19:25:05 +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=lC/ZDy8qUbu37+KBv8u+hogm7MY7hhdjcVGMpbY3u4E=; b=H3p+B/R6BQ045A 5WaiZUezBZ7u5aSIssbybxLr6ss9VJnCoL+5dkNEMdbDbgaH302cOp63ZQQHaufxyqPOpNtnHeP3d 9d361j8X0qlClNv+kXag69Q5+1mUlPsBczr1GiYcuwXDnvaU4HuSPNdxXACYBsmdbctGMS+nbaMKM SLBvrCVv8NjMlga9y9p0Ec+I6P9UYv0QwsYs55HuRxYifHILAT2/hMVfPoVuUpsY6BAmvuFcngM2A bY9be2n982W3WaPlw8kk2f4VttClp9j+RH2dWD2fF8gaEquLZuzUO54oENuN9sOaQJseWq0jaNEVC 1Jijv0LPi/5r2mYttVRA==; 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 1cj9s0-0005t5-Ly; Wed, 01 Mar 2017 19:25:04 +0000 Received: from mail-co1nam03on0041.outbound.protection.outlook.com ([104.47.40.41] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cj9oT-00019N-9u for linux-arm-kernel@lists.infradead.org; Wed, 01 Mar 2017 19:22:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xDnN7wZsQwk7ycotvPtUaMv9IPMz3yZsm2FCDIOnuzY=; b=JdEiuGc2pLiy9SUCTD92kJ0OExWuxkjg6GDJ70gNUkRiu33vluEd6BYeSRgkSfFXmwWBZtedWTAjBzt0xxcJtQDVM6VdGHNZrxbdFgKNKEOXmxZF53G/cJS8RQS+mwpmEwBoyhj5KUFyNSfWcxEPhY1H6Bm0EmXWU+d/cDldoXQ= Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none; lists.infradead.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (27.97.135.110) by SN1PR07MB2256.namprd07.prod.outlook.com (10.164.47.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Wed, 1 Mar 2017 19:21:01 +0000 From: Yury Norov To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Catalin Marinas Subject: [PATCH 07/20] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Thu, 2 Mar 2017 00:49:15 +0530 Message-Id: <1488395968-14313-8-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> References: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [27.97.135.110] X-ClientProxiedBy: AM5PR0101CA0002.eurprd01.prod.exchangelabs.com (10.169.240.12) To SN1PR07MB2256.namprd07.prod.outlook.com (10.164.47.150) X-MS-Office365-Filtering-Correlation-Id: 32098d8f-289d-449c-b601-08d460d819d0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN1PR07MB2256; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2256; 3:oUc4aUHd5uxmcDIVB/G/CHWGPypYqMX2Tor+9cLlIEaX8u8yfWusKxYkOMKMeze2q9jm9fk4O70gj9lX1WJb80oGzYw43u6X6WAJ0VSXzHHoqoweAt5cbFwgn38Q+2zhYNGs5y5D16zelSgroxnYqg+NBOcLOK6V4g6HSzpOMS1ZVDssxzlgXYbf+pTYKiA3FuDwKLsH/wYyag4TP+mx1ky3ZURxPr5QMi9Lbl6lorF/UUzM6far2mL3Ufe0keSGbczhgXtNv0dRoSkypuc2qQ==; 25:7kETBw0VVAQRam4g1NC2ucI0jsRqw8nRWo8GOFxgvpaoR+yjhh+aAUf4vrLEnrTF29GqNmYNwD4qrqSC2itWaHyUbLCnjQsrEiirgSijvFuMKvtjk538aQyr1PUXkRXK+ppyUOiw0AQVhaab0tfMUdGIBWIxqDEc4d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h3lhnZvqL9diILA01fI4GNOEX1c7QJV7fhwSJMhma3DZqybeLXSd09lsWHIDpDJCHprPtks7GfEVARdFaLKb1jMk5kSjnN7EMpmnjiKsU+54cUZSMs9KeUli8MlTDC/BisDIjIpdfqvodk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123558025)(20161123562025)(20161123560025)(6072148); SRVR:SN1PR07MB2256; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2256; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2256; 4:tgjlMdv7GL3ybW4iRsB2Hqol6kk6/HnpEbfv4WFIihJuwWROijUBVWYbXjAFkZFL4YHoKMXEOUr6aKQhKUUGhi/JDM9YueeoLo9yZ8StYm8Qff7otugabWEnvLlFukhMDiQ66yoaMqyZLmpgh+lVSnnZIuyKhYHzeSTV3Y7tkslwe2VGqzqCGBesRYpwiiK49MFvUWZRViMn5vrlxugrifAMLKO2uxONt266pse5Tf7aDJs+fkGUurVxzBXgOollIHahReoqfx9AyB4t36C1JKa7R9Bx2Ty+lAK+nw+18xhaQALREzshzpB/mpr6OC5HcRl7FKR0nhhf22nqQk0WNDjGz5O3JwqVsHpMQgrBg2O57iGzaDjmbtt5CIe8J/Q4s+vNGwWWz/DhGhu47gRJk9+DXpfcmvB88DMjae7wfXUdbm59xMYlSTwgT6kRnrIashYejKpynrCAzNeVZkFlHgendIExYYTkxyrx4ePz+EI5Bk9pL/MwQo2TswOVt4u4xWcpZZwOfgbe0cqeSakB3MyOQ2oFwPTa5GcUBMrTdIIS8aznpXSVB4J5tkTO0qMe7EqvXeyDTmhZI3O/AbH4YG2qTF8kDOgVyAB+AgG7VPk= X-Forefront-PRVS: 0233768B38 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(81166006)(8676002)(42186005)(5660300001)(92566002)(2950100002)(6666003)(25786008)(50226002)(76506005)(6486002)(53936002)(5003940100001)(38730400002)(107886003)(5009440100003)(189998001)(36756003)(54906002)(33646002)(2906002)(7736002)(305945005)(66066001)(6116002)(47776003)(48376002)(3846002)(6496005)(50986999)(50466002)(7416002)(4326008)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2256; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2256; 23:2W5uNwPZ69ZLpgJvFejagaLZMuMfuiwnxVvWHNpH5?= =?us-ascii?Q?c6NnMuOnrPC5FUReo3MhxsXYf5Bf5wfb3dHspPDX71d4A+9mjrARDZ2+PoAR?= =?us-ascii?Q?eEIv15TLffevIKTLmUmUxi4B5DYDCNwceZZUTldUdu3Mah7LGVXyCuU6S/oN?= =?us-ascii?Q?FSoHnEagXwlfB2vbADtj+BS0Ly+jtMVG8SPchEx6yroUEoDctukm1fkBW52g?= =?us-ascii?Q?o+1sWgv4uV0q2Y0KcePEvQkmkEUwNUlPloyIK5/SpCRPv43oS2gfyZTZ5Z2N?= =?us-ascii?Q?9LWG10Fe6cRPibo7/kn8mFdAaetf5ihVFlgsrM/UWpRkZlahAZPeOf5aMWrg?= =?us-ascii?Q?+s6XXEFGv77eNwYLxQR+8NIyUUEUUabS4ltAJvAOIp3ltJk7hQPPRLLbfKHj?= =?us-ascii?Q?HxSFc8OdgdhQyDvtL76ZSSBYaSXJ8HR/9uGKX4po9jlRIX25cBsNZkGNgGa6?= =?us-ascii?Q?Qqan65uRozJ6LJy1Kz5Vv5z4HdqV4PEhGpT9NsCeQCbLlhSQvoZRoipZcCM1?= =?us-ascii?Q?N90ZKsuDMV+CudC3hNuzQB2A5z1fJmHh1QQdFd8ZyyaA8zpU+3tH/30lx9mW?= =?us-ascii?Q?Zu75uW/rpbPxn2IwFns+MAFDuq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Fq/zX/NBFbnFe2BdX9nKtGH+Miwtpwj8TlAwpUP6BK8=; 24:6jJFQi4sHdfOcceYbRbIHdbkPOGBbAvjv79c5nqBQ4Zu7ySY47XxWQsBmuft2gIGcgioGXjc920L9w4VsW2SCXd2Q2zGZxHriSVphvFYCeE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2256; 7:Tpaz01/FB8ZoUk53Bm8OoabxlUnkjfWf655RdbIBf6e0BDBCqAxTAHKiSZGD9zjFGHwLD/e2VB4IpzrC/hh8DQuuvbd2bw9+yn7yIBzrv6pBrGQlrWKyR4nfbdZG3fe9uVGlOn2P3v7axKuTC4IvVd+EAMVSmS0/5BQ3fsBJmX5kXy5C7d37o+lr2YXEsWGWIslP9Iezy/V+EsSumEYwj+fD9SX1h2FCCOjkagQzufCFuxEILBQyhIIAiPRqutaNJPsdZrran7Ay/RcDX3fn28+6y5wAg5wTSoDiQkx3b66SQWwcP36h7R+NYpvh1vxuMygaKWDV1YHRMQwK4E5PSg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 19:21:01.9955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2256 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170301_112126_349983_64C6AC2D X-CRM114-Status: UNSURE ( 5.92 ) 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: Andrew Pinski , Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Andrew Pinski , Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com 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: Andrew Pinski Define __BITS_PER_LONG depending on the ABI used (i.e. check whether __ILP32__ or __LP64__ is defined). This is necessary for glibc to determine the appropriate type definitions for the system call interface. Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/include/uapi/asm/bitsperlong.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h index fce9c29..4265243 100644 --- a/arch/arm64/include/uapi/asm/bitsperlong.h +++ b/arch/arm64/include/uapi/asm/bitsperlong.h @@ -16,7 +16,14 @@ #ifndef __ASM_BITSPERLONG_H #define __ASM_BITSPERLONG_H -#define __BITS_PER_LONG 64 +#if defined(__LP64__) +/* Assuming __LP64__ will be defined for native ELF64's and not for ILP32. */ +# define __BITS_PER_LONG 64 +#elif defined(__ILP32__) +# define __BITS_PER_LONG 32 +#else +# error "Neither LP64 nor ILP32: unsupported ABI in asm/bitsperlong.h" +#endif #include