Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753761AbdFSPwI (ORCPT ); Mon, 19 Jun 2017 11:52:08 -0400 Received: from mail-cys01nam02on0088.outbound.protection.outlook.com ([104.47.37.88]:36800 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751041AbdFSPvs (ORCPT ); Mon, 19 Jun 2017 11:51:48 -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 , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com, Andrew Pinski Subject: [PATCH 07/20] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Mon, 19 Jun 2017 18:49:50 +0300 Message-Id: <20170619155003.13218-8-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0014.EURP190.PROD.OUTLOOK.COM (10.165.188.155) To CY1PR0701MB1865.namprd07.prod.outlook.com (10.163.42.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7d86538-287d-4734-352a-08d4b72b1746 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:CY1PR0701MB1865; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1865;3:R4b929sBrTOsnHKuzYoXVAaPhYyTRQCqBYiNftVIv8hO2Rr2pFYMMR/DZHWLXEFYr/+B3gJBzvGO1VQHnsAWOfG16ljIpGci9DgA9HxMG8aSUPb6wh2MM1rS4Vw3mET+G7LiybWJGmMXViw50upjyMi5KEyewJwNNsjhX8vqhO/3QFoDiTwQEtrZpkpOjT4XWA7BnCt4pKU2w/QT0/PGYC9Ao+zq5DMRjWKTf8HxhYriT/CPxm8uOAAVJbnNlvymLCfSQdPkvueB8EMIFlON819BRJsoXpXSqu8wch0NaPD/N+CLLRgl1ezWdgbNEl1U8t94Zji307dYcCeUk83EkQ==;25:eKQbgHTOSHspxSTyGFjozEY+osLAEAXGI+L3hnfLYYvabTW1QnDaY4CCRfu5D4OrbNGHVNO1mMZqQzLFX1ObLxxqBZVHuycxVWNncDATcnWAdpaZLiG4EkOKbNa2MmKQ5r4fgCvgcAYb+j0U/2fFitYzxOLm4hBfBTDkbf/rR4QCcqcM4mS42QMlmcrQZx2Upw1osXKwJs32TU9RXAQSG8cKRzh1GnYrlIUXgl017lKy+G62iTPmg5LOOMO3YXymq+M5DC1vKa/R3pAFURQHbTA/D6t54Lg2/kLu0TeNaGGShSmEl993xfwhRs2yqEQJWS9EfDLvnOR+7FIZhGlbE01OKzHekAKFskq0Hfj6j3VBckVUQbEXeXXPZLPh5TxtDNAC+d3F2ocQs9S18ZKYXIU6s7dg5wYYtQ8NpmzzgPj8To+RJL29Txk4gvJusUsk4frWDjmD24d6Y4BUH29VLZq6F80iIN6K0SNDwPN/Uco= X-MS-TrafficTypeDiagnostic: CY1PR0701MB1865: X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1865;31:056psTy7B5OrjDGsbCGxgQFkwRnwdZNcgRADuzHBdgvA3ljzWTV5Jgs1/efT7aCm9k7hk1bsSorNVksS3VVnkRy7p7Giv8F9mFnrBjBsMTloMCK7GA6Q50WNJihrM8OIyfuUldAyzzLnlBCfgqZiGKMt31krccdIQS5HmwbsJXM8mZW1nBdTQUsGNFhXPA5wh3qwZXqHly8i51dPaWu2B6QlVk3mwwzWjYWdOcja6Bg=;20:IDoLACK6bd9CCwOpFQEbiCTlmrAa9Pbg98y/QHw6CGCGuPGB1PWa3LRLuad96kGbmrUccpuctXqNo07l3Rcy6cK/kgtXFXFgvH3j2Q1nLJja6HUr6J0YGnR1BcOGrNkTA0Mu45q/5qefswTpthm5T470ayc2jjyC1SvOrHRF2eXDXeB6VTLWaX+hfbTvH6aPYNYHyUu+EHGwHiLS1DH6fYmr7LCzpf62eHS+AMV6TCdm6cKDHFCYh8yDrDhfS8FUamcuYZnje9l+DeKcWoxHgyBviePgelv9yu+gwX6FlDJ8I2jJqkgP9Bhw0dw7vV3bHMrXVQXqtXXlI/6A3bSsnrm2TgsqUAnzDp2WIjW3J7uveiMReRm9CiRe3ACn/ECzJkI593Vd0AJWW++4IEBuv3w6mDZxCUuuvfv4xvgbPnlKw6DxbRzj2M/T6bNnKz7wvANHeSUiz1t/RblUuNZBozV7WmagcF8cyjZJf1EsvY6isKbGPXhRxfmvnFV9+i2/c3/gguwdBDOWoRfICr/Oj615ur3w8z6hi2eOBxnFlUWoq5m1DzOlD4bVyTvJtvVuK+nCUKCMNCjew6vhDmxkD58XjzO8NgKHwBz3xt/OaR4= 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)(8121501046)(5005006)(93006095)(3002001)(100000703101)(100105400095)(10201501046)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0701MB1865;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0701MB1865; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0701MB1865;4:4+fKrPS2KKXoPUwJgfZWHAsvYG/TqsOoAsmaPPFO?= =?us-ascii?Q?86FdZR92uph8acQuyqW/1r56XFpHCFBrYeGYLps7axANcdJUnv9e3MBrk06/?= =?us-ascii?Q?XUqYB6ES2B0gr4m98TnJ4Nmf7rg+lNrzujcsFBnMwO29a8X7dTACpUtENhW6?= =?us-ascii?Q?VNL8nAAgvvVopBf9pz663Krol6A1yX1wkDSQeKAxSocjh1dRbbKK74mR07HW?= =?us-ascii?Q?0M6h3oFFuveLmrA+1la/M4zUmdlyXb+cxGL3SYa0/gJz9WN6zV0V12qEkopI?= =?us-ascii?Q?xTu2rvRfYg+0gJRXPImjlcQ1VROi+y4Xx+hA3WHt5wT48eY2CvLKLD4XGa0z?= =?us-ascii?Q?09OUIXAcrcquKopN9LmgVyEINYr0TL7fAC1n4fvCyNoWaac9wGHXNjTekyiU?= =?us-ascii?Q?mJMrUo2GpIh2Bhj2iSIn2rFXpiFNrVh9Qm2HpbIICSTZyF9hHV6zr05zd+qk?= =?us-ascii?Q?5vn9ffF4x3Ibd5W8oOXNtPlV4g/E/hsgr5frI327miKiKea9Sgb4bcDCFBMT?= =?us-ascii?Q?XKO513kmlheTXIV3TqgbPRii1/HFCkG5vrBDeo58MGFzFj0ve8jMgOQggpD1?= =?us-ascii?Q?LAUbxewx8GkLzcNQVmvEPYAoh+I1SKkwRWWzhit2GoSQEQPwrrJ7QEvtG96/?= =?us-ascii?Q?bRvqyEgEXsPfKAWMXXiuxuMIOQO/08I9Z1XSdcihxOKkLmEIfE9rMg6uq0qG?= =?us-ascii?Q?2Q3r0H9z40wN8G4C1Dp6luCQuzuGOi120rrSLuZyIN+dwvDVfEep6TwuHLv9?= =?us-ascii?Q?1FEeCm6vNMW+4CYzH9jDxRjYZEoEx51Y3PJfYfnjCbLvno1GXDmvxd4eS59J?= =?us-ascii?Q?LE0vC7MMIppESEAAZvcMyk396FZYwNMqrh8/T9LOiA+KHYwxJsdTfVTkW4NT?= =?us-ascii?Q?3//dhgJDQ15Ik8P4FGeg54mRZQ/tsKoRPv3bg9GgWYBtIGOPCGaY6rDw3GAt?= =?us-ascii?Q?lsb5uFK5NAMOQDhil+d0A1T1uZ+RqQu6hz/hox26l0vtkQ55dvVpWh6Fg6Az?= =?us-ascii?Q?cI5Z3INbk1F0ks7dlm186q6hIQKocjtEoxcNNDBjySslhFPJZbV8w+k71QjU?= =?us-ascii?Q?zvMi8JOd0Ci/ep2Ka1fyjkqp2Y4O+JsITo5KcUFgoZAvQjuduslDj7bhsj51?= =?us-ascii?Q?b/G6VSMlPdE=3D?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(39450400003)(39410400002)(39850400002)(39840400002)(39400400002)(72206003)(189998001)(305945005)(478600001)(2906002)(50466002)(76506005)(7406005)(5660300001)(6486002)(107886003)(7416002)(38730400002)(36756003)(33646002)(42186005)(5003940100001)(7736002)(54906002)(42882006)(3846002)(6116002)(2950100002)(66066001)(6496005)(48376002)(6666003)(47776003)(81166006)(8676002)(25786009)(53936002)(50986999)(1076002)(76176999)(50226002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1865;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0701MB1865;23:zOWD6eFM0gUrqLAb0WM+mMd1fXpvAz42vkyz0xf?= =?us-ascii?Q?wUW0WtZ7wUok4G3oq+OxSeZHEk0c0HlS5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u/+3I4CrQbsWNNSPdug1QMnwE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1865;7:i5SwZtfwIk7sySR1JmquhPzMoM+ueXxaDj9G6Atf+ECVdWKqZ+xbMT0U4LJ9rsUe4G640PM5vNdm4w758AWV8yTF+TjTdrT6ZCXkYTHnhRBCig8rj00Gnr89k9db2l477GethNo4eSim+3rE0voSUuFIpgq3hw1xvsQKEK5LsGCaRu3WnQ0Owr1pWyVhId7wBZVv5Q3sAIaNWyewVlvCtTexU4NoAZ41UwXB0mM8qs23G6x1xpdfuHOUKZ16cOa+dsX0r5d0jzNfQKTbWone/i4+vv4DDEY1GJCj8wjeOPrD/llvyJs8yCm1rFirMCIqxg9ddta/wQ6jMm0rHHwlMYGziTq2JwXQM9/obM0aN3DTJcoolOLFvfWio+TXP3RosgbVh7cRJuquaqhJa6yq1ZMAsdN4Xi4jt1mUR6N0n2lMQMllPue+W/3GVFa039r3HWSI/hSCCcvxp+U5qGmgciKJzcVd9rXFoDjwYRKuPaAHTTHDdOlrlh5UMg9je5H9kgskltqD/+kdR6rW7kvzthjz56o6gbM5BdwuHQnKZHBmpPlSHnClbYkZOyO3iwudy/+HKCp7oX+3dkZ/Q9Fgn18YEHXSDQ0jPPle8odp2G9kAQQ/gKWauJ1Wl1ox2uHC31ULdvVYM76WEZnZfXtSR6ad6pqyNuaz4JP4S1q3vbmkWLSi6sAmDa49iONjCFdBp2S35HgL343z0oYb/va9dWWGfNmgkqQjARoUk1oPYCzNRSfe0LouDILOOC4Upc3UVZ0BAcN1FxdE4x9aZcSLRvmaavrxaHaGS/vDscLZfL4= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:51:46.3661 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1865 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