From patchwork Tue Nov 17 21:16:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 56868 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2183946lbb; Tue, 17 Nov 2015 13:18:48 -0800 (PST) X-Received: by 10.66.155.197 with SMTP id vy5mr66253191pab.109.1447795127782; Tue, 17 Nov 2015 13:18:47 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id da6si34896282pad.156.2015.11.17.13.18.47; Tue, 17 Nov 2015 13:18:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754883AbbKQVSk (ORCPT + 28 others); Tue, 17 Nov 2015 16:18:40 -0500 Received: from mail-by2on0061.outbound.protection.outlook.com ([207.46.100.61]:27218 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754721AbbKQVSg (ORCPT ); Tue, 17 Nov 2015 16:18:36 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.120) by BLUPR07MB612.namprd07.prod.outlook.com (10.141.207.27) with Microsoft SMTP Server (TLS) id 15.1.331.20; Tue, 17 Nov 2015 21:18:33 +0000 From: Yury Norov To: , , , CC: , , , , , , , , , , , , , , Yury Norov Subject: [PATCH v6 05/19] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Wed, 18 Nov 2015 00:16:45 +0300 Message-ID: <1447795019-30176-6-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: HE1PR03CA0025.eurprd03.prod.outlook.com (25.163.170.163) To BLUPR07MB612.namprd07.prod.outlook.com (10.141.207.27) X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB612; 2:Q63sKuKaCzzTPL0g/KF+0LtE3tMGEvaIP0Pw6d5P3tpQ26dadJof5K3pE8aucXR2ZJS07XvNmo8eLFruxaq4OM1UcuGYahcyBE+r3vZF3U+YRMZvKHV1+qohOK+jJ0xH8NSdvLvXQEeSSazGiPIZPw==; 3:TbgcN8CHCwjFYlljuK3WZueH5oRCtxGXuxIqY4hXC+iksWKu2ArbgjQTxwe2G9Slbd5bflxlltCto1QdCUJhtUSrPgqbAVE7VelADMDajfJsMICqR2gXCLUSob5QXH12; 25:gYxEANcGces9MRZm9b0K2Vud+U7l1SqJ3ubdHStQO3QIAKEW65fXfW+2s0dU1e68yfxqVlx+8yeqX/REiqaLiMZ6cL02DRmqKQ8dYo224oxwFhBrs1MUuiz7rLofNa60w5NMQpjJDHSBRwq+VzYfK3f1wxYs9SArOhloabdkIVNkI8YF+RDzCnpR9/io3OxKlip11LUL68/KfRO1gD0LjdyzFKUMShAx2BKcVOBLHDJGZddE63iJnxB92lMwp927EoHLSdhpGeUN/6CLaC8iTA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR07MB612; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB612; 20:Nwki6n4jdcJ5Dnv+LUA4NLZjya3uLRlLVrJ3aaOmYu14ZpIH7YdnBSzL2gfwzMBs2SDbw0CUwn3LpcHUTq0VXz8hYDazWK6jOaC3x4uFh0C5qBIVcF0A/N0Si9PnessVb7Vb2P2VQVxkEKVfAV80by3+zv5oBn5D9y2URid+CpNWbJhphtz/X+m0lFG2VxW15qJAUtX8bpylaGlN92vaLxs6P4fjZtCa+IjCXgyFy9JBNe4tUrOFq6CL18NmpdCcWtNERAeku00SnR5WNpSVjnp+2tBYoUyJHx+sawMhdYdmwC/y2BzCpMRGF+/Bbdtq4UjA57mGvRbNdQov2Lh+BMKSat+mWkR93ueu32KrXuNgVetYUIK8arUB2I/i4ZpUEAOXWdXLHNplUzuwqFkRC+Y5mMWWtYKo+JTQvgSBrqfoJjzUeLwVGB6tEmBTLAf/l08Au+zsYRgB38YKAx2AE7phYK8TuwI26gBFZ3ZVbyhh8ouiIFGNc7yE3XndEokVCGDXpP9wlPx3lr/qwtMjQUrh4av9QRvY7IygaFnuKMdc4D+II3twY21SyVh2s8SvqXHsMEe1siQN1apPR133E4T+jlpVp2NGsxXnxmSXHHc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001); SRVR:BLUPR07MB612; BCL:0; PCL:0; RULEID:; SRVR:BLUPR07MB612; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB612; 4:rn0Vt6T14PNXI36vEn49nNmrbrG3nB9vaOMqeA+R2OxSklp0Qc9Nn1itdOJBQHJ2IDLcCt1dHFVBknRuEJrQYcZ7w1E2Tnx+eMmpoaFDlteZPOteE9NfbsyAsQcniX86GA/33W/qFF3w5LmRc56XtnbbdRwqxIC0n4eLfPq5LyfZKxeohmwtR369KLfGYQquO0ylnSrTZPD6rQcoZ/HdK4P7VXhpZHt5PyQY+8je6lJgaLP3SDmKzn1hz9uCQYpApjRQGY1qQ1k8nHjeh9Siz7odfZjE68kOEKuBur+7FzpZetjZEH83srMEVzzikC5xPzkndJ7zmtNNmGgCYyDJf/1wmJDgklaaEW6UJCpXutvPfMnF48jtQbMP+oqYBcSsS9xzKKZUOtebnLZMvmK8YgIeZGkL8ZcDHx56ZnI6BbgxG5B4bjSHhiesmr/fu+tx X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(199003)(189002)(97736004)(77096005)(47776003)(5001770100001)(586003)(122386002)(2950100001)(50226001)(229853001)(81156007)(50466002)(76506005)(76176999)(5004730100002)(2201001)(36756003)(5008740100001)(92566002)(42186005)(40100003)(48376002)(5001920100001)(5003940100001)(19580405001)(66066001)(5001960100002)(4001430100002)(50986999)(189998001)(5007970100001)(101416001)(87976001)(105586002)(107886002)(106356001)(19580395003)(33646002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB612; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR07MB612; 23:CzuwSNNoA7sTUBMu8OyOVCEWlMJ7U7NS7Pi4cl0+B/?= =?us-ascii?Q?E9b34zvbffhPBwV+PF5XP9PBo0ZPtcyHMUlDmXB5kTCWQFC3qSWFE482/2jU?= =?us-ascii?Q?v72zkJnuBUc4+5lTI1OPaGa23p7xJgv31Ju/3t6SZ3xnwNyjk5iOv6Ic0Q9/?= =?us-ascii?Q?8RTx1a7iVnhdDP8fEqDvfPBs03VNYyjcq6NzwcYArArZFHkIof9zinnz3hAR?= =?us-ascii?Q?yuRCvsyhxuW4xfifkPCSxSyhVha46UgJx6zorgBcfT/B/F6f3aMcdLprlI6j?= =?us-ascii?Q?qZH1i3L3iS5Vd/tfnalHW9cQ0T3uUcdgT9KxLhwttsjn/kI0WntZOV9CFv7w?= =?us-ascii?Q?XvOBnBykR1l9S0Z9tC+enz+MI7Rf8ouvwEvbAi8zaw/km8dWACJ+sIozAEtn?= =?us-ascii?Q?1L/3TwqVIlZvvwpCRWTz3ZE4vSjKMF+buCLjwMxdNHlyaKQ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KKkTHm65CPOufXEIGy9YJIxc7xjWzbluPvmiR0tMWZgBCgdj8Y2vrxVH8R52HJDndeAUDrXKruDGiPlL/28/LL5cLlURzRUGqal/uxoeBDs= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2015 21:18:33.0048 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR07MB612 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm64/include/uapi/asm/bitsperlong.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.1.4 -- 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/ 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