Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933766AbbLOVol (ORCPT ); Tue, 15 Dec 2015 16:44:41 -0500 Received: from mail-bn1bon0053.outbound.protection.outlook.com ([157.56.111.53]:20065 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754399AbbLOVoj (ORCPT ); Tue, 15 Dec 2015 16:44:39 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , CC: , , , , , , , , , , , , , , Andrew Pinski Subject: [PATCH v6 05/20] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Wed, 16 Dec 2015 00:42:31 +0300 Message-ID: <1450215766-14765-6-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR01CA0026.eurprd01.prod.exchangelabs.com (25.163.2.164) To BY2PR07MB615.namprd07.prod.outlook.com (10.141.222.150) X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB615;2:o030nZfLJqhrwmAzx+h4JH/5F3tiPgd0bOv+0IhNBWG5oALV7ByZLKIXCW0a03Q+T15WK/ucyiOEFjxuWzI8Te+hBl2C2VA4yTBOWjI2pQitCVnoFmcJsdGRXjZnJSM0wFf9KiwkoAx/REgQdRFdiA==;3:Lpr/mNrlC4XIw7YGmYBEmjhJu1xX03I8b5y49QUSJaXQOQdAP2chST9fEcH8PdjV+XzAuc1B/wCITB9AQli3fhEb88L+CAFNNUTcXuUq2Hyxci9PvSa16gDpHoYuIi2R;25:+KhTffykOn8mhrEJ44HDqEyqVlJLJ2thQI1Q9IduwePrA6rLef29rzRv2jur/UgO5g6qmOk7foMfsU5Wj9UYBEx3EpNhbAfRpkD2avAwWu5+l92UZ7NkcA7Mi01wSXdbD+702W49lW6EwyttWpZQ2WWgDD1AfSbBDv3reWhheFDu9AqI/KkorCbgeggWibhkceYlxHvTjQnS2TTgS5ihcEHk0BUAZ3vW/SDSqaMryuU625arEMMONchuD9th8lWgiHNBgYSkwSyD7HO0ZSLiIw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB615; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB615;20:1TxUGJdDdENyfwjT0evtxiCwAeHFaGQXUjqXaAWwSoCjyUwrJ+E7f0pk9GyABmf/kHfyOMopUx+96/Sm/zPVIl7yUFRQvtcuobuoc+aiBAevlOc2GXMFhurNrOPAjCIvbd3LxyFNA8LleU1n9+fB0D3Y9hJSpfeXU/DE5hO1xDecYaQgjJPUPXfHzPaaknqsFNnWXwkmFTg8oT2dkDdcO9wyPEGL8NfcdWiOZyfqNWLGMEnNm7IbH4CKT+cvFPpzVOTXtu8DLrbPuAbKT8rHcyb5h8Bj9nT1M53KO77ViIuLJHxm5dRCfyKpH2hZdcgvA2GV33lf8FDpysgJGFL91eDkCFqakzA4JNb2XbF6S/14JaayKY63Ys5+k3swpj4OMIQRtgYpPqgzwEl4yBT0lnOuk1avk6p7n+pjk/2iw0p41yud6W1tf+vO6RfGLGyAjVGuGjWJVwaP/DS9Jm26SrvYfYNivUfleOpdqIYcT84Phrtm76PY5+F37nQhBvhArEyZX1zfErKh1aevqpslMosPj/ATgK+SkMpX26E1kjMiedrCtfk9Qqo423y7RQgac/bIoMaEg+ZyL3M/WfnokJzzAgoTxKNu3KWE4fo6/7g= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046);SRVR:BY2PR07MB615;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB615; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB615;4:LAF2h+yqKgWpA4Ux6lbjTx6bV/kXtfBa3lIM0dw3e6E640lCpxt162mFdBnB6TrECT6EFwpn9qEoSnRWW9MSh9ci76COEluFZQ22l/cLUejMmw66CBQ44bXePMDJlbILkZF0Nduj+Ufkf1MxoA1A2J4jUL2hzWA4CNiznjQjuJHMeCu79u4QhnKrpT9Qmn+BeyuTnCvn/SPNC2rZQastH+FdpQESFkvmYjszp9Z3dUEWUGyfil/nz9lf2LOxneFBIEyGp4PCYsi4sWqFFe858mPPipc8N97bd9VwlF4tkcCFQofJgUdJmRKFmCMfIbGV10c9BjZegRanh1vNRioRUWDyptyM0xPQxsvRd5Q0MzKcNWh7ib8T+rjk0ggmFzTYLpUxKFZc3M5o+Ffi6OWPsv3hByKtThoFKLbXQsa361p2b4rHlz3NzK2jet+OELzZ X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(979002)(6069001)(6009001)(199003)(189002)(81156007)(2201001)(5004730100002)(101416001)(47776003)(50226001)(66066001)(97736004)(42186005)(87976001)(19580405001)(19580395003)(5001960100002)(189998001)(92566002)(106356001)(76506005)(5001770100001)(50986999)(76176999)(105586002)(50466002)(229853001)(5008740100001)(6116002)(5003940100001)(36756003)(3846002)(48376002)(1096002)(586003)(77096005)(33646002)(2950100001)(122386002)(40100003)(2101003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR07MB615;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR07MB615;23:fNaNwomnKXhpeGkhbtMaWAlJlH/LIGwAK9HvrLwLvZ?= =?us-ascii?Q?YTloYZuNeAdaGEsAP5dWJAQhzaiqcayijnvFS29EPelvQ6UPHpRwMMEy0aaO?= =?us-ascii?Q?w0uCaLUNn4xzZ2kGzo57pNw2u/uU7bUd/RIqoN26R7E951BymuJVKBIwngZD?= =?us-ascii?Q?Y/LPFcfBrYRiDM6SyajrYsP0JBYnGyb/bSXLjAPSsYxDTtcL041iYEsnRQV3?= =?us-ascii?Q?pXXyn1jEnQ9lVHt9+qsozpw85XI81hfnxt3dWXTJILb0WVko1uUquzoTWk/g?= =?us-ascii?Q?7MUYnQR60fGedcoF8447jrFB+kkjHhAUBLdzphBPOf7UJFbPBU8a/aThDGhR?= =?us-ascii?Q?QEYITPQZMYwIPGznkhozRgiv0DsU/FCVfOiyfNjiwzoFzUt3pBs3VqntT9I5?= =?us-ascii?Q?g0hTh2jTHN42u05AKLCkJq4A2CuFyIguPUyCXlH87Fin99BAhh1SFZezJV5h?= =?us-ascii?Q?H4g+zLjNiDnkPyHv+8IAgkAKmRA+CN9O8KYaTPvq7latArilxW5XCnF2RFZ4?= =?us-ascii?Q?CYhF5lathE1HiVQftX+jsLs96UmNxTv9Hbk0JoEXNVk+po6hxB6drBEXpisF?= =?us-ascii?Q?bjiSt7oJy/e1n8CT52q07Ls8PxRUZUXgsWJCJErJO3qVtQRQYYsePSb4Yl/o?= =?us-ascii?Q?aHURYu+BvvTSiRSE4TV5dwiba3eLWjO+tqYzDXlft4IGeqLAsMc1kTF7pNhM?= =?us-ascii?Q?PvodXxNWSWgOV72GbIuBIlTsHInrU0Zrqbjou92yj6DxaPUx5FK90m7B7O+X?= =?us-ascii?Q?sW9408IJN5dnu8Ou/iAVUBzQpRuaa0AUAAbzvtyZtt4ruG74WRzjW+rW/h+O?= =?us-ascii?Q?7wAvcScDGcQ+84s4PF+hsCJY/nlS4cejMId6IZXWF1iTHznw1QL87JA6NJ39?= =?us-ascii?Q?WRx5X8OEof9D9f2fv+VRewzFaW/OstH95/DOwPrgayGO/7waokZs3g8qJoxN?= =?us-ascii?Q?kqirHPVFOEy3o+A3h3OnLOqvFniVtX3hWJHmIHe3QfcDUdZQcLFYmXoF5Jwk?= =?us-ascii?Q?l5yDtnkNqtCv5Gz5tO88qPesBtDUvmTd7mGYXun3PYVKpCBbVeXf9OZHHfCZ?= =?us-ascii?Q?E2dbHIFMbCsT5WdpT2fsrs6Q3SXVmA0rT7VMOHATsy9F2tLoA81kTpklkZTo?= =?us-ascii?Q?c5E0rStXEBBzAM60JbZ+biIRAelhQ8wMdVjMrPw2y3NoQut7pAz7xoqFldHU?= =?us-ascii?Q?yUZjHf6a/ugd8=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB615;5:LnbyHIANfTYPrXwJl5NmMVnf0A5KdrKiHjC827HdEXdW/yrdvyBTVdFyxuZrQP8kOEnCYS0V4qz7bxhn/Wx/+48f2SXL8iS0B3Mo135RT5syC11kMZhuvtYWUjBu5ByzRutrSr+99m2cltYCp2Uxdw==;24:iueEzEjjitpZxOE3acB4G4uWpK3Ql7ZvFVQGvz2e5bfvbgIHJI5czqdkMAhXhfH1UCw2naep+sclxyenFyh5SRwgOgxHw3HGjPs3YVqN4YY= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 21:44:37.2129 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB615 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1574 Lines: 43 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. Reviewed-by: David Daney Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski --- 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.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/