Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935833AbcJUUuB (ORCPT ); Fri, 21 Oct 2016 16:50:01 -0400 Received: from mail-bn3nam01on0057.outbound.protection.outlook.com ([104.47.33.57]:39184 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932967AbcJUUtz (ORCPT ); Fri, 21 Oct 2016 16:49:55 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , Andrew Pinski Subject: [PATCH 05/18] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Fri, 21 Oct 2016 23:33:04 +0300 Message-ID: <1477081997-4770-6-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> References: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM4PR02CA0012.eurprd02.prod.outlook.com (10.165.239.150) To DM3PR07MB2250.namprd07.prod.outlook.com (10.164.33.148) X-MS-Office365-Filtering-Correlation-Id: d0915ae8-aae6-40ad-a389-08d3f9f1a493 X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2250;2:AYmUBFxOXSpImPzKttyn4uuvkQv8jl+r1AlWwZfo8OFhCKF9IiPEz/Ky/rpEKUsySvZrdfGVNPz5eYExXe8gxEwzdtmGPM1Eyfb8u2OeJzHqste8K1uqXPBkA1cBtpHshX0hHkHweD3FF0Hf5dKAYZdomb1/mfJ6myJm5Y/Bxq4j7NiA2tx7PARgEI+ohYhQShtWYgB7WZ5GXa9WPJnPXQ==;3:vGzOyvmhs4uEAH4AE1dOYWJe/IeAssk6TBlbRbgbasizAAsPkKV6aoHeV8moSMxEaUxbPy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cH+AylfEBuMNZqTStmErghJT8jK5MCkL93SsIzNAu6fjzDbqiU4IauI20Kqqyv58RXIahic2J7Mw0G7wygK8YW7MAPr+CmXQx+73AS2ENn6GB8sw2lxHLlRXQGKJup+71pK15cfVdNNqsPKyT6PG1hbugZTMe+U6k+kgZniwagmZ1mn1l6PZgXJgYXMMPXzi3RTzpobRY6eA+SWQvif7aIvBBRwZ5lvZKJJ2jbBCflKdChx3FTNhJodVC4MWNonbq7TAHHBzbpEODHPR8Cmz1r0hUaT6Gzk1YDnYvxH3e0YbVw+DAABvvVW06c6TbWYN07vkZa8QZMCGDtJHLI0Q/ZVe4/JKqCRAxqnkdbdCJB7fFbLAADJ/fYH+cCCXNRKtcQEl4dgGR2ELbXgcbhiwUR6xtJhLDUR5zY95ueIud+eDfXmSvbTSantOSUvHg4xnt+UwILGwwc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:DM3PR07MB2250;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2250; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2250;4:HpW58RAD8lrZlpvbI16i7EKduRNui78cOzUcvCYl2e2ZB2OpioRZe5gz/J5nUwvN90y9WcF1QDVBJuz0bdWjuVGUWb+JpSvdsuXL8uiy8yQyx3bOzJE179p6iWWhrz5/oNRkoahrXeIUCjYCnev5MdqkyWjhrhJsV+TI+vlYQF5CF5CZdZhsNOT6JONYxMrgU3IhWdUiBBcyNCIB334PaFRDVxChO/bmEwsNo5hlDJ4GYl/DLnLn8F1kUGNdlw5sgNDjS82LAWqGeC2vbtX2ItQXNzS/0E1BNUjSmIQAFwV0d4mawyoVWYeWgWde+m8U/CyNtULUwiE9l0x7EZOOWBTODhRIu+9pf4s+AdECyckb+8yGPDtRbfYdSuYOXoxRdRBwCYzrNiLLUoFKThIeww== X-Forefront-PRVS: 01026E1310 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(76176999)(50986999)(4001430100002)(7416002)(8676002)(81166006)(81156014)(586003)(5001770100001)(97736004)(77096005)(68736007)(33646002)(36756003)(76506005)(42186005)(105586002)(2906002)(4326007)(106356001)(3846002)(6116002)(229853001)(5660300001)(50466002)(107886002)(48376002)(5003940100001)(7846002)(305945005)(50226002)(7736002)(101416001)(66066001)(19580395003)(19580405001)(2950100002)(47776003)(92566002)(6666003)(189998001)(2201001)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2250;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM3PR07MB2250;23:NDKb0nICQOcMMOR/zKPLQUcGjGPYSkLl2tGfJFOM8?= =?us-ascii?Q?T+nbT5u53OFBzl5RcIyAEczD1WVbY0iabe94YSHZ1dNAE3VqM22/MFUBVIPM?= =?us-ascii?Q?Tsnf/MvlliFKX6+HC+84gYcw40tHvyMEMhYYcOYAbLqTWWDPA1RVIR12sIpz?= =?us-ascii?Q?RmVDTz2qPSxyJjMhqjDDqFIISHjsp0bzBTx2OvewoEBADG9iXdI+g+izgCjI?= =?us-ascii?Q?VlKFD0gIpevWVWEX/720/K0wVGjaVWhanmMSIwwPxQnRVDOugJF0Y4NfXxRX?= =?us-ascii?Q?V9ah/w/QNFkYnfdnR+Pq2T0OTLPcKkNr6uA9mqq6Qn+LHSUutAvgV7QrkVDz?= =?us-ascii?Q?FoqMVPTV4HDG3p3eoC1cWHhQ/5L3IiKP1SaoFueGl8UqyqBBg/eOrUxE8PYY?= =?us-ascii?Q?81massYxJIGWS0JZk8vADO9jKgI8r+dq5wmmxr4ZwA7iTDue4W29+nyV7xTH?= =?us-ascii?Q?BWO7q17gqrDdk3lx67nG8u+OCtYibPnL3LYrQ6gAvQixH5KDrzfEjtZXLP7r?= =?us-ascii?Q?uBAdQTxjnYAnbhUdk9auaqKDjZ1UrO0dtjolXL4RdgrcFEgqVINUOe05AyY1?= =?us-ascii?Q?UxD82zO3fB3dzNdQOJPOZt9VxzhrWI1n3gPFOK06jDxNn2IMcJSr37wU9jDn?= =?us-ascii?Q?wwgq8gtJQx/BhmsthLkS44TrNev+ZGXGq5mcyYPPxPbIF5bYbPoUjr7N7qyg?= =?us-ascii?Q?R5opoa2z75GVCuutwneBeObwgZOOX18K/iGfcWd2eS1S/3mgAn2F/GabNohk?= =?us-ascii?Q?XPfpF+/9GH+QL+rvVP+1YCU6v1vfFcdRUTKTw54k0iH0jJbzTIUtVpZ4Mtku?= =?us-ascii?Q?BXtRttvej6ccoY1mLMWM9vg+Efn2rwuN4Nbdu7LQz5GEQ3y8sNU3sbTTd0G0?= =?us-ascii?Q?lXwsbvCisJWvYZOiMehyvjN5zgR4k33VwCBp3mJ9KRxKsN6I79oBtNKHfNIG?= =?us-ascii?Q?0mfGbwfYvFcSqDKkSo5w1FZWfpSwXpKN+KnwmLiA9FySgf2bsj6DV5HdOWDm?= =?us-ascii?Q?o263maqwY+TGRu2bAoT9p4L0fyRhdEMd02qtKYmknRd28c9+GzuyXpSv4dju?= =?us-ascii?Q?vfqgDMallnxSVFyRC690fV876sDVXTRbkq/kNpHvNnUA49ZSGKAhTW1J3i3q?= =?us-ascii?Q?yqQMVjvd/4UKS+4y93xmV5dffAZRU6RnLJIDlHOD7ArSqPozQNn3lrn/qJZE?= =?us-ascii?Q?vBftu3mEP2LqrzofBko553DsOgknD9WPfFHWYQl3zSGrm4w6waQ7oJ0pA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2250;6:nmdEwFplkXB7nnVKJ03Nk8neMX/g89r5YPcVvJYOfWcuFHAczPdGqyExCtxeCXjK9S0klN6cAz2gAGTr50vosd4X7KmvxuSlcwUvCIy8PyDDoZdi6w/ESaPecHyyLjB/pFw57+gpGZHyDn845Zwee9FzM9gNCMFUPOp6+3zq4UoPSQXR9T7Kit72LdjXfR/L8TT0bgg0XcWv1FHihNxLUxgtmJi+MsH3PIXKumodKJQ45hATA6lyqd1RdgGop7sk8e11Q0F/DHkBjl92SgyC2pAsJsMiMFLcW4R3wvb29QtTxSIl74BnqyfBg8lJjqzb;5:IKGq6h8fgHH+f1C9op48Ul9wyL4O9pAYd5rXvJ9tmFGqY3Kf7CwWqeP68HvIA9HQonhcFCwO/mwUtBIBl+FqTli18KSgbSsq/DZZQNwVpY1Y+kgvrKnjb06JsYuPK7kJoaMU9gyLDOS23J+i8ZiM0fo9QOPPtt6ko5Fhjp3Lsxk=;24:TDEe+LvZjB3j8r5bb1sPLm9vnz+KUL2N3yFbicN5TqV1PezrVWPmqASjFrG3OBq29hoPXU1N12Dh4oOokspegYdXSX+QA3zAEmvd6w+uAPk=;7:6zJxh6UkY7c1/whc/LVqHVySis1r9Qg+87yaDRSqIH29tb3VHFQnaXr9OmGlj71RGJ/oZDQPDl+7w3pn44d3McTBtUPiVYr6AR2COrYvYZHcKNXPy+2qTOH5YcgMjuaJLj8oG7ceqPREMbe0jrPsaQqxYcCsJPj3YVFKtp467oPj8q8FnaCxdC1n28+LTmK+U+NWrdQ3S5xJqc2yBnD6jJXqtCHn8vbHwgBhkQA9FWvFMtxEMybZjFkNdW2GMehFe4kVdrdweZwrs7S86AUrdPc3DgKOkv/t3J5V77u+9hZdQHDN9Jh4Dp4ljlnQc+oYW1kxaQcmUu+d2p/GEfrHEKemhIHBCXvN2NpCctQTzpw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2016 20:34:22.9642 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2250 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 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..ab61d68 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