Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751826AbdCATjb (ORCPT ); Wed, 1 Mar 2017 14:39:31 -0500 Received: from mail-sn1nam01on0075.outbound.protection.outlook.com ([104.47.32.75]:42487 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752492AbdCATjX (ORCPT ); Wed, 1 Mar 2017 14:39:23 -0500 Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Catalin Marinas Cc: Yury Norov , Andrew Pinski , Andrew Pinski , Adam Borowski , Chris Metcalf , Steve Ellcey , Maxim Kuvyrkov , Ramana Radhakrishnan , Florian Weimer , Bamvor Zhangjian , Andreas Schwab , Chris Metcalf , Heiko Carstens , schwidefsky@de.ibm.com, broonie@kernel.org, Joseph Myers , christoph.muellner@theobroma-systems.com, szabolcs.nagy@arm.com, klimov.linux@gmail.com, Nathan_Lynch@mentor.com, agraf@suse.de, Prasun.Kapoor@caviumnetworks.com, geert@linux-m68k.org, philipp.tomsich@theobroma-systems.com, manuel.montezelo@gmail.com, linyongting@huawei.com, davem@davemloft.net, zhouchengming1@huawei.com, Andrew Pinski 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 Content-Type: text/plain 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+ppyUOiw0AQVhaab0tfMUdGIBWIxqDEc4dIi8oStQb1mktMTXMDsv9/dOmA09ac/GvQ1YBy5RD5QMGmqRuS7AKhI04pZs+xG7e2iQJ74xPqFj84tTd5UxEKF+vlKAU2UhfDf0kQ9UQe+8XtGCrW79i1Bb9wP5/lvlZnGoukRHzmtQ0hJ0lcO2Lxl7n2rYf0ktqa+5TRfoGlf+R/efcqeWkseI2si995PoNH+BcLoThCFYNF+1imFGx+ewn9sWYPVk4QUqbi9COGcRCwJsxpc7xNVPqnfyq+P+dKNxq47NPziybPFhdU4bOXYG2KC6P0Xa3cchphybU0dSdG0FAWEZg== X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2256;31:ROXyHSzCSwuy/Q/7nOKwgLxsyKj5EdtSR63srHTL+drOyXdBq/pZgDr/TaDBP9botG7kOCFfJUWVuDFpAkLWKwFyD2vJaO+IvMC6jCylssVgDREXkMNCM0CZ/6etaDJau9cRz7+gvH3pfpeDF4NZDGF6WQ/vYMvkDoaWdtn9NljWSAf+s02s6M72h6nNtlna0qXgA8JDGydRn5Ot9+u5isEe2WoJ5ElPAshgP0MgDTk=;20:Ag1hbGEPPi72N5ZiHfaIW4Fm2nACKo3x8mepm1Xj+mbcfJVoaxqne9qn/pe8tdOSXOjh2xFt2vs0QTYoqjCMphxxEmYsRv2xn6lL+sfsZnRpIDxzdPId3Z0PMKBS6aFoQe3YKpZF/KHCSLpPbs1fAV1InwRdm1K8Zz4b1CEXDAMj4rIIY8LEuSdAEkb+hPLUDlU8NVybYCjrL1g78DDM3We48xTFDrgPy7klJiBFc9nmOMqSKeXZIzTsnY1qh2feSgY33tDZzxTXBiRwIORMlpzjXCA+u/2rp/IeQdLwcF+6bYcLJ+cwO8ral7L0RTTgfhxatsVhBvEeWTbHYQVNMhqBDSGL78Lj+J+Ji0d9YWnMRcf5lE3YC6ZIwNT9bSiq6HCYYO3vs2BfFfc0CY9vKiKdnMLqksmZKeou85iHIoIP5GnBr4j3bFivmvw+EasHfE6pVtNtjo7ChPVAIsMhUY9zDTTcKh3lhnZvqL9diILA01fI4GNOEX1c7QJV7fhwSJMhma3DZqybeLXSd09lsWHIDpDJCHprPtks7GfEVARdFaLKb1jMk5kSjnN7EMpmnjiKsU+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?eEIv15TLff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kagQzufCFuxEILBQyhIIAiPRqutaNJPsdZrran7Ay/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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1328 Lines: 37 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 -- 2.7.4