Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751353AbdFDMCU (ORCPT ); Sun, 4 Jun 2017 08:02:20 -0400 Received: from mail-cys01nam02on0072.outbound.protection.outlook.com ([104.47.37.72]:56987 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751339AbdFDMCB (ORCPT ); Sun, 4 Jun 2017 08:02:01 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann 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: Sun, 4 Jun 2017 14:59:56 +0300 Message-Id: <20170604120009.342-8-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170604120009.342-1-ynorov@caviumnetworks.com> References: <20170604120009.342-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [176.59.55.28] X-ClientProxiedBy: HE1PR09CA0082.eurprd09.prod.outlook.com (10.174.50.154) To BY1PR0701MB1269.namprd07.prod.outlook.com (10.160.108.156) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0701MB1269: X-MS-Office365-Filtering-Correlation-Id: 6c5de244-186b-41b5-7ae2-08d4ab417be2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BY1PR0701MB1269; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1269;3:92ZhwWKnvwWPrfkCJoJJ3WdCvEq3+1zxgs0Jv7NuRz+qmMz1zsZcXUlGYqD5Km2TCKfowoat7pz3rN5SmeV0EuaBeuYIiM8DG7IK7sLhBNfr0uKRoEFGLAbt0Wqi4SpUrPUFcIH67KFG5/3I332XazDXh04xc+XGG96IuAt2OJlY3+wi2jU8EZ9JvJYuL47UoqXm11DGySwPi2/Eov+92zf3v8w8fCoKpbVD921yjSSovTBNW/Pk/ciQAzXVyo+cDuk0hDmY9MZ6JQvxYmUtq+WbvJBeHUwemdlXL4+2Xd+W13CDDInBVOcwz/b9NlU2SKds9nLpwqFjvK5TeikncQ==;25:henW9mwaKKsV2OJP6qNHtMf4LsOoJPXcAh+OusWwkv4ynQ9JUP5u+gRgZLr3J5ZZTLDUfyjD0eA2BEyxvGcza0tb1Yi60ed0qy1S9Ccpk28f9xUY0UjDGVKGKSDqnIk6BHY5h5BhN299Vcs5jUPfqlueCDlev+rF6ru/Aax5nUM5yakgv+861O7sziMkj6qEF9Gswtd9iRRk5rwzCycQ68/l5lDI+1bsfRCQyzhnNusyM+wcmVPS73yVre2BoW1pNbnEElwmntIV06FCQPhBbYxrD62D12GN01zFHCTwE4UF4yIArgwvMDB7UBOkknZYUCBYL0BuvlohwEqrVji89KXTZxVsexBUbVC8vpsqk9i9vQxsugIh6BEML6Exneb6BYeYjxW0rGwfDtrw41Cta+QXOKOj/Uw0gki8yNFjdsZe4jAK1l/RS014LxXSiEIhK1dQvUlDyM7o7ErwWtnfviNIRXJaqjrhT9h+HsDXKgE= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1269;31:5Bqjujy3CHgD2YkEDjaCFBz+e1j3wgx0QEoMaWTDdR2dHg1ZkiEL1tnsjnydzNPlFMa34m69vgDeXipKiiGytHu3N4dNu3YJov5WlJXfZCbY6ZZm9dbKkGKgvhprVI0Y/OkIje/0v5baBACZO0elMRvR/MJvRD1c2WhZYe8KjT4uAZTuqz1YYe4qaBosKmwagxWPExB3EvwQL+V1bAmWUxCcwaRjPRtt5QY/COcPoMg=;20:Bdu7eSz4CxD0j3c3UP9ZyP4ejAwbKjVfyx1JfpCnZ9CO3JqxTlriJrGfVmfUTJ203rVXRDpMF/mA+EqeQCBL/IYVwDFBmbWwGkXqT5xFlG0Sl8MXRrwIQHdl7ypOHfWWKTfETPB82kSls4U9g0YdsnaIju4fYxLbiPERIxQwoNJzFWFAbcxdXX2BNvlDfEeelqvSJdYGCjN96vxJRx6kz2SrlFTAsVxNZ9IyU+tD91kvz41a+FzPr8M7W8DgL2dGwo8Hp8TmDtyzYXFdCC3b4ciTkkI5uTVLbOjwnwcLxUnEWTKsmvzJItEApywRibG+REymp6FQKFXxNweSi/v4+ThVvcMKA5I91rF3SFTQlBodOO1XWkpyhALHI5tL/KbwnO2GbrzETxqJ15AAyVa3QbZWKr9ujIUnykospcwFvT5hcSrH8rOgeqmn9FdHhyFadN7vDR6HYIIPa8vuVgGUO31iuL+vMRriC1pm5X//vLQ8B/Owd1ZyplzzAfpE8XH3Vk6KoYvzGUSB8zxpKeSTDiXsJEEqADURjWkiNim5bNZpPbqFp3QsU3O1g7pthEyWeU2nQojdMKUp6PdSrMf7PEX7A92mg4MLovQ6KJeU7HI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY1PR0701MB1269;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY1PR0701MB1269; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1269;4:6G0EU89MJ+6fIrMkwy1CFATLt+flvZ4yRKwZEzu9?= =?us-ascii?Q?TaoPcGtjFoolKDBLJMGIfKE2R28SCmaTBG1KMsbfWsK7DHv3X0r2M4H5Z/Bk?= =?us-ascii?Q?VzBKIBljqPyKhoHZJK+dvG8aWXAeHoWTHybdTLmssQhMOA2U/kJ+B/lAg0ID?= =?us-ascii?Q?/HCaoK+e3hvbxcFs/a/nbDIPsubQSWxePsnfGtH4Kme1PVhBsUDpdfkbxMF9?= =?us-ascii?Q?pfiuBBMdb8IHumX9R+XbjrmC85cTOgaOGdFUYmB5Oyx67+pxU7h1k5CiWio+?= =?us-ascii?Q?Xh9CveSKynwPRIsbhhOctaGnDepIaOvJYCvoXAfalUaIftssWz0amJT2Vd72?= =?us-ascii?Q?4LmxZ7dVltto7v+Ikt0DnHeugBNjRmqVLEg1tfkg5w4hQDz4/L0TfsCc0lJb?= =?us-ascii?Q?SiRpGCx90ZW5qPrYSstoznzLUzLjaiOJ5W8cskEP1cd+34tC+PTDf4yR5bkw?= =?us-ascii?Q?QRKBfEEUBhOBGK8Dfhie3budfXWQTGug+cPDAmpn7IGhajCBfdzUPlybJ2F2?= =?us-ascii?Q?xH81VHBmr5/MUe8fMTPn7yKSp5qDMUwqo71ZAA+gzjqzPnhawOO6xy2uZdcL?= =?us-ascii?Q?qB4qOsb4w3ISEP2scW9gv1BTWmpXZaU4KTS3H8jcQpr+9et4Cwk/SgSavujW?= =?us-ascii?Q?hkP9NY39AqXze6IWX+3bRNqHLMkGuH7MYfo5hJY/5zHF19CnCWlcBeKbid38?= =?us-ascii?Q?Gi9N789f/dxJb8NA+mXWF0zOT5pYrLiX13NrTKI/3zhkz0r81fmQyiO6BdLS?= =?us-ascii?Q?wX5W+9D9A5IaOhVvBa/o79W2zmxLjtCvpeDgnxGpcb8brhIwWCgCtbSgfP+h?= =?us-ascii?Q?bCJciYhGuG3wo5+Laxkdr5thUmoOhlXv/OruwViIpuDqMMEg5QjUthecllbx?= =?us-ascii?Q?9dvThGigG/OVmzA7KQsRlWfu83lmGQhe8a//sXEhpfV9rltidqFtbXzTk+PQ?= =?us-ascii?Q?QwD9FNF51XtXxWXstd6i/j/+UWBKYI5QHP9h8zRLFjV9V8WYn1TR3SVOFFoj?= =?us-ascii?Q?NSQl9UnxZm7k3jOIyTAFcB/aQRtZwg32hiyr8LeXpV3wUX1tqGnNlEYRzeA9?= =?us-ascii?Q?5PE1etYXPWE/+hwn++Hj6m+dFF23QIpCciuhyFj1kR8f7Oip5oGaBcY/nwgU?= =?us-ascii?Q?c/OuZp1a+C8=3D?= X-Forefront-PRVS: 03283976A6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(39400400002)(39850400002)(39410400002)(50986999)(76176999)(2950100002)(42882006)(189998001)(3846002)(6116002)(6486002)(2906002)(66066001)(50466002)(76506005)(1076002)(48376002)(33646002)(4326008)(47776003)(54906002)(42186005)(5003940100001)(53936002)(6496005)(81166006)(8676002)(25786009)(36756003)(107886003)(38730400002)(305945005)(50226002)(5660300001)(72206003)(478600001)(7416002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1269;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1269;23:5vOcJbbEnjyjOxtx7kildtKdaqUY3Iq4UE+0nW/?= =?us-ascii?Q?/kqFbK6okdY7XPuZ9U1uYDjoND/y7hzxoOxcOISXhevDLEPoKj3f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ME2P5mfa9CXEonGBhsOFn/HWJ1Tg0hruKkNYw5BAcuxPOVeQxVUoVgm04fSm1TF8UMc+iWSxs8L0nbIxBrywTBBQSUhriCqosOdY90l+YSOezELg;24:n7HrF37JhAOPc4kf0gB2/597gruC736x10b7jdzijPL3hHb0Uje9KussGYkXB6dRshpCbhyxmVwQlY7jZfBfhMnSmcgDQHvd4EDgAc+a5Lg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1269;7:aGfwZWvWRb4XG0CCBWPZPO0vWZHaNW5PbD87wXF8IO3zUFnod8Le0ReZqQXnPy9L3S7Ugj3iV5zhYKPpvBRQrozVyUQozOHxunQi5u6ZP7MgtmJHyszOJkvTRCetEDTG6/CHy+w9XxrPhjhbWd95qIjBxs7GTONknLg7Y9+Bb4pD0jpC4bcAkMFYDDZ2qDzdYqWWyloEE96HT4l+XBmVi1Zz1lb/+f7j7fSbeplCG6PG02Bne4YpGS4lJlgZ+n5JEvCK6JtcGk8bwxjmHvyp8Kcylf4vRnFnUxFq0P515VE7QRP9ui1vp9aLipeafrzo2KspmihpcLFeewYrqcPMqg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2017 12:01:50.0812 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1269 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 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 fce9c2924fa3..4265243e326f 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.11.0