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: 7642251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D14989F2EC for ; Tue, 17 Nov 2015 21:21:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2AE9203F7 for ; Tue, 17 Nov 2015 21:21:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F3B6200BE for ; Tue, 17 Nov 2015 21:21:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zynel-0006kW-5t; Tue, 17 Nov 2015 21:19:15 +0000 Received: from mail-by2on0089.outbound.protection.outlook.com ([207.46.100.89] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyneS-0006Mp-Fp for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 21:18:58 +0000 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: , , , 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+buCLjwMxdNHl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==; 24: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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_131856_799309_5998F244 X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, jan.dakinevich@gmail.com, Yury Norov , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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