From patchwork Tue Apr 5 22:08:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 65140 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp716018lbc; Tue, 5 Apr 2016 15:12:29 -0700 (PDT) X-Received: by 10.98.64.132 with SMTP id f4mr33703936pfd.146.1459894348007; Tue, 05 Apr 2016 15:12:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ey12si10222824pac.203.2016.04.05.15.12.27; Tue, 05 Apr 2016 15:12:27 -0700 (PDT) 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; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.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 S933761AbcDEWL4 (ORCPT + 29 others); Tue, 5 Apr 2016 18:11:56 -0400 Received: from mail-by2on0077.outbound.protection.outlook.com ([207.46.100.77]:50490 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933719AbcDEWLx (ORCPT ); Tue, 5 Apr 2016 18:11:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CDuBvEcof/ZkIKZXnuNpspNzryq2h7Lsx02iWrorw3E=; b=t9Zzn2hqu+XzC7zekucdFhbMTvwJAXA7QECVSwY3BPndiwlKLZQqsCkuxnVwiwW1D80nnSmZPhhJnQ7z06mZizitKdbI0YDDOKg8x4EStpmElEW0S9CB0ll9Ahd6gEQb4KZpt7j3K5GvT7ayZNhBovdwCj+Zp3ql2WtriwCfCq8= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (95.143.213.121) by BY2PR07MB615.namprd07.prod.outlook.com (10.141.222.150) with Microsoft SMTP Server (TLS) id 15.1.447.15; Tue, 5 Apr 2016 22:11:44 +0000 From: Yury Norov To: , , , CC: , , , , , , , , , , , , , , , , Andrew Pinski , Philipp Tomsich Subject: [PATCH 13/25] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Wed, 6 Apr 2016 01:08:35 +0300 Message-ID: <1459894127-17698-14-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459894127-17698-1-git-send-email-ynorov@caviumnetworks.com> References: <1459894127-17698-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM2PR03CA0034.eurprd03.prod.outlook.com (10.160.207.44) To BY2PR07MB615.namprd07.prod.outlook.com (10.141.222.150) X-MS-Office365-Filtering-Correlation-Id: a505d52f-5657-4220-92b8-08d35d9f4664 X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB615; 2:aUvWxnlYfp/oxpADLHIXUlHkH71eloC006XpsGZYuL1TqqW8Z01XMqEN48Y2V1SfcDawz3l4ZZXA2qjjxnfgAmNcmyCsmmiu+9VWd94cdNcyKTwxVHzVCwQdkSEKqYTJhpJJHSgxPqPQXvnbl2/47/wgvjY4NYZHAGulXWAnfog98LHx5BInGqoZ95Jxfxl/; 3:3ZDq1ViFridt0SUdk1xcFYRbGWXQ0FKVKM0pZGItnBOdwBX+gJIQl/+kA6EcIeLIyhbXU/wO+2w8h1PwN4wCw2DS3bd7/NgFEXJOy4RGT3XQS1tT+bTOfRWjAMVg84RL; 25:y07boFc51XcqmD1S67ovrYy4f/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5e7PHwpw95GZa+vGWLxeKX9tdSgOf5852HcJv+RgbSf12F17Iu9Au87dWtIccRCkvK8jCSdtH1ToG5fv7wIrBXuGIqetK/RqK/tLHttNcWRl9m55LbcaHzlcCtoAtcQk6Dha35a74MRX7e5cZsy9W5sMUp88O4LXLx4GtnCzESFB9gvKhxQApnluhA2V4/Dk/uXskwDl+arCDogE0TYD5bvsZ87o8Ir0FaB4KVL69smaswtukM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BY2PR07MB615; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB615; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB615; 4:iXW10tV+Ub3CT7ezNJfKknb17DmyMZAua6wj/5mFL8HftHNgs22Y7fIMzpbovFv03a7qI1IxVrjGAtWzPszb6NDbNcpRZrlslgQSm1JpmwjHMrat6PuPusRSaELQhfCw6mTquTar2hmhsfXrnO7CPeMuGnHMIiA7uIU5VxnTfrPf/ullRVftC10M7ehuMDnBoBu41x79TYnAIOrzJB6Ct8vqGbvnGGstIuTlbLgDewSMdXsNd3TLwHL5EE/OeWY9jNrW0/kojd7g3RNur0tHIq1JHKpI91kHz6qqHM8ym9XG01Zd/Ef5U/rUoZPeZP2dkC8/voE7gom0bcqeGyYGQMKAvHzCyhC2Vy0hNvwCCAp/KCio9ryqSHL9E2YVG/As X-Forefront-PRVS: 0903DD1D85 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(48376002)(66066001)(47776003)(42186005)(33646002)(77096005)(3846002)(1096002)(6116002)(19580395003)(19580405001)(36756003)(5001770100001)(2201001)(189998001)(2950100001)(50466002)(76506005)(50226001)(92566002)(76176999)(50986999)(5008740100001)(229853001)(5003940100001)(4326007)(81166005)(5004730100002)(586003)(2906002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB615; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB615; 23:TnIcj1r6rnM0iW3prr1JW3OeDPFa43evHzhIX9o0zdsFec0uIQfeWZ5ZWB+Zof/FLLwgSzY0XhcpUHH2tUkSPUXEVC2ouVm3ekMakxgkqw6naqOUhiyFw1Y+ejJmOD6v3Lj35UtW0xcB+kIVQWkX4YtWmhxqqewtMgzJJOMiMhhM37/9+AuJlwx07asaUHiJB3ujV85oUbzHM87jB+ptIQLfy+1BKATx8jYZnAGz8qS8eh8BwtU+K7mamhxFDU1b3egwfQDoi3qlI4W3rkZkql1zKLEG5ypLG9EL920wKvUwuRtPPy8t/mGoU0JGqSUEx2UwJYqHBgMwn33yHl/x8jyBeL+O/kM9x9ZwEKCJ5dDcA9FpBidww3InLlONJVDg2fA7E8isUxP4VkktBUAbYZYpSzXbBobv2sueqVS7aNr5qmhaJJFCsrK741yVtD4fF28UYsSdszIsTEuG3guhVTKFlVlsdo/SDCsh/rB+STPyuEwXqKijrKNaXI59qyJYghNDj8PZaeQ6R0OClYxae2bpY4G3fTv8bjbsgTl60Z8kKgS+81MOF6izQYzfHu/vP4nkueG+0RZoB6eoAMSB/SHeQNUCKRs7HeJ30exYve9Iy3phg2JtNpyLw9+edPgGp4dV5qWEaGghQRY8tacdm5y4+dLwzxaQ+LiMx9nRJtTKXn6XXunEBVMEwdp+eMCHapnttXYsot5FY8uC1eOqwC6S9qhV3gqmO2Zr4QJ3FDTZrQxSJlEYclLGlKeVnPc28iqOUjookk/edvozW9M96rHxL1ezO9gN1SMPorkrDp9kvEGbSOgdP+IOA2BViGHi/i5bOULO4qqfEceMEZEaGr4/pA2+839ad8DZwIFH0g20AZnVWOziOGJekno6WDLkqVVguCo7QSzNsSQJJt8YsEmoGROnL0iHDR1zRT7q6NYsGgUVdRF8SScfOylrsjS2 X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB615; 5:6wLvog7Z/OMkhiReTuFD0Yhl7HZ24rrjfbp2UYub82g8iXZBcOpyVBBm508LLWQi/V2s4EdDTXA2x3BlJnojIv4V44l/UY+WYoHE+jIFeI3YPSfF1Y4JHwKknV+RT0YlG000A5qdDKtClytHtGoOMw==; 24:IdASnuCYanGzLnMnuWkhVGCx4bt3uVGrVvaxyMzvB4uPVUATp0HApCkBel4nMJWelZoaIKxXfz+wTBqdW41VDqG7iB2P0CaJaGiObqkXZYQ= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 22:11:44.7020 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB615 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. 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(-) -- 2.5.0 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