From patchwork Wed Aug 17 11:46:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9285681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25D1060459 for ; Wed, 17 Aug 2016 11:51:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BF3429072 for ; Wed, 17 Aug 2016 11:51:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D6AD290FB; Wed, 17 Aug 2016 11:51:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 8214329072 for ; Wed, 17 Aug 2016 11:51:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZzMI-0001xm-SR; Wed, 17 Aug 2016 11:50:10 +0000 Received: from mail-bn3nam01on0056.outbound.protection.outlook.com ([104.47.33.56] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZzKQ-0000NX-8G for linux-arm-kernel@lists.infradead.org; Wed, 17 Aug 2016 11:48:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xDnN7wZsQwk7ycotvPtUaMv9IPMz3yZsm2FCDIOnuzY=; b=D9Yp5zMwYZdbDGuXEryP92RDx4glJjjAp2YKB8xMHDjTlK3cKcad97qANA2h6BAntZKNRCkQ83/9YyOgGNtwlfXp/nW722QAYukIihTH9E3zQFBgOWls2HmlGIB7atZELCTiBD4FUEbKI1/PWEnzvNqmwlfdOlIq2127QgC45sE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by BN4PR07MB2244.namprd07.prod.outlook.com (10.164.63.150) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Wed, 17 Aug 2016 11:47:44 +0000 From: Yury Norov To: , , , , , , Subject: [PATCH 05/18] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Wed, 17 Aug 2016 14:46:30 +0300 Message-ID: <1471434403-25291-6-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> References: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM3PR03CA012.eurprd03.prod.outlook.com (10.141.191.140) To BN4PR07MB2244.namprd07.prod.outlook.com (10.164.63.150) X-MS-Office365-Filtering-Correlation-Id: ff95cd7b-a9b7-4bc9-3001-08d3c6944db4 X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2244; 2:Y2DCXhvvbEkDKmT6RW0ymKaECUUYoKXyhyMyamf1sJ9w0DWPvwSA7DIhOb658adrsoPOegPcP3Q0jAwY1N6ObiqP6SJSrKoFTOEHZWX0q5Hrzrn9m21BKgIkpn3P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microsoft-Exchange-Diagnostics: 1; BN4PR07MB2244; 31:oeJr9+gTEWOCy2feys2H4nPC9+mXH7wm9WnmCKcgc5IG7WiA4RMl1P4PNTrjFqbp7af0xUrxySlaTkqCDclS2IxgdXbboImP7Z4XnUQ17N1vcFDoEuy2fd+ErQ2b5g1T3LIZRRh9ZooGN+AAei6e9IMm5/BDGD4/LgUTsZ2UqMpmDBXYWTq8rlDCTVteBsv5ahW+Znlvq+vT6D73EXQBsF1viXshJ1TMyAqWPOdM708=; 20:Mta3P4DAt3hnZuMA4tn3N/qn0h3NMLByJi1+4e6zHIIEkM+LxggYO/vl4QAvMOLMSHkUMEPnHi03Tyxrbi7sWvD1mHjc44RgKBR1vgofRI0w9OcblEAHhguIWd14Si8NPPnupn1uO4kjXO81lKWAfH0FyTBHa1XznaxkgVDo9pYiim7v5R994l9veybX1wFDu3bxeM+hMgmOXfB7XASgRTCt80z4nv+wxtuMpuqUdy6z/Hk7xMS43/Z/B3olbh2A50cMqqeQ5JUFNccWWjflRW9OMETziUDyPFyvyuCwj58SL7DNECle8EsKn9EMU4mXuQDLD1D0fYKwTYmURCqFL7Yt5u17gn3tTds3OoLqWKp5JoebG2Kgt5qTAErScDq67mBPTCDGTZ4/tzs39QLoCuUUNBiNny8jPWPiOFY2elgI+L0gyYaSJO/3TXNzZZKIzsVIboruWkkdqsU09nM7z0yNE0mnpeRik/da0rBzy/4fKUzerckeR9JwObdTC+anylEA6Yqzo/C+BlFrnUbUofGWyloYKG04XQoUzDQ8WvARMdTr2GZPXXK8TrBO1ybDX+PeVWfhOqmxURQxoCNVN+jWliCbH/TijSjR3+0wDic= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BN4PR07MB2244; BCL:0; PCL:0; RULEID:; SRVR:BN4PR07MB2244; X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2244; 4:MsUNllUhzasVrckHb9BvMC0i0IqjK8Tv8qaC3j3soRhNPOrI/uZSqr3RsxJIuHD0HEzDhAUsXYV89qvZm/ob7BaZZGgZKOiS6TMa2xzoCIJrZWkyYJYTsqAVzg++Qg7Ir0ITD/y4RYiImzjGqMvS2KbfexsHQyNQDQSZnAi3kFA9z6yBV+Avp1T2/kSg2W+DRVNQJZWVMsr8mAtPKTvWPtLl3A0ei9jeZTLFy5l4TLRKqsC/AFGQLHDEptiOLZs/pM18dFRfmUa7NmzRZngUCmYg10MmhaVVtAjbMq0xl00LaYecv9jr+pc3YTCCWjQlcyrYp+juBDp+FUbcMhL3ShmgTEoFDwDdrmeD2uZvd9nreCdf912zFThdCXd5S512R5a8ezvwY+OcmOcEd0ywPg== X-Forefront-PRVS: 0037FD6480 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(68736007)(4326007)(101416001)(2906002)(8676002)(81156014)(47776003)(66066001)(229853001)(5001770100001)(81166006)(97736004)(106356001)(107886002)(189998001)(105586002)(19580405001)(2201001)(77096005)(19580395003)(92566002)(2950100001)(50986999)(48376002)(76176999)(50466002)(33646002)(5003940100001)(50226002)(305945005)(4001430100002)(586003)(3846002)(36756003)(42186005)(76506005)(7846002)(6116002)(7416002)(7736002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR07MB2244; 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; BN4PR07MB2244; 23:gxT3V3fjFHio0Qsb9OljimC1tR4IK0OtzJiK1u1RF?= =?us-ascii?Q?1WqTymNRtL5UgyuMma4YVtL3PawluhbhiXRpZViVasZmsmG49hf+aTLuBeoY?= =?us-ascii?Q?sV9BNhM3bert9Oa7tGuA80P/LM0yyVnL8ObVEX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xf5+9a6JE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2016 11:47:44.7393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2244 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160817_044820_420432_9DE7C4A3 X-CRM114-Status: UNSURE ( 6.33 ) X-CRM114-Notice: Please train this message. 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: szabolcs.nagy@arm.com, heiko.carstens@de.ibm.com, cmetcalf@ezchip.com, ynorov@caviumnetworks.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, zhouchengming1@huawei.com, Prasun.Kapoor@caviumnetworks.com, agraf@suse.de, geert@linux-m68k.org, kilobyte@angband.pl, manuel.montezelo@gmail.com, pinskia@gmail.com, linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, bamvor.zhangjian@huawei.com, maxim.kuvyrkov@linaro.org, Nathan_Lynch@mentor.com, Andrew Pinski , schwidefsky@de.ibm.com, davem@davemloft.net, 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-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. 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..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