From patchwork Fri Jun 17 23:54:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 70384 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp518237qgy; Fri, 17 Jun 2016 16:56:04 -0700 (PDT) X-Received: by 10.98.36.130 with SMTP id k2mr5343574pfk.118.1466207764910; Fri, 17 Jun 2016 16:56:04 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ie10si7852629pad.48.2016.06.17.16.56.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 16:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-70766-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-70766-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-70766-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=JvW0w dOtDjM3BZrbPSBys++unCOvvVob2ew6uSD+xpKWlp53uoUm+ROENU4Kpgp3GGyvz OtfbH1n+mnxc+7csMmFdDw4L5AsTKv2XhzciZYOiQ0yQp+UZbnWxu7fqy2qSyj3d fUK0Hzp64TnzvpCU1B6bqsBy6sSITJHzCjmFyE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=XMtA+/QQYdX 4UTjUKB8OdmJTBl8=; b=r6O/ZH99YI+bAP6KtyRSP3ujIolDexmHXKKlwoXRwMF el8UghNR2Wd3kxKe35bPk8GcZlOIMKMaTWNooj1OggAOmgwv2sVxE7Nj0dS8lkZY UI5ilXB2mNBKBGlODkLYq9dkw0xpPrMhtq4bIzf0FCpGXELAaqsGULyNrAK+EHJ8 = Received: (qmail 90617 invoked by alias); 17 Jun 2016 23:55:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 90495 invoked by uid 89); 17 Jun 2016 23:55:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_50, KAM_MANYTO, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*r:sk:na01-by, H*r:207.46.100, H*r:sk:mail-by, sk:philipp X-HELO: na01-by2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , , , , CC: , , , , , , , , , , , , , , , , , , , , Andrew Pinski Subject: [PATCH 06/19] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Sat, 18 Jun 2016 02:54:15 +0300 Message-ID: <1466207668-10549-7-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> References: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: BY2PR07CA0033.namprd07.prod.outlook.com (10.166.107.28) To CY1PR07MB2246.namprd07.prod.outlook.com (10.164.112.148) X-MS-Office365-Filtering-Correlation-Id: 279e49ef-bd46-4d49-4129-08d3970acbd6 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2246; 2:Lw5ccfVS7bRK36LVdgQbyMatHSD4RgB1iuTo2MAJCj5IlgaMNHWej8gzU11tpeNf23A1K6RHKx18y2IQBnd/a9AuRj0GKGPGaYu4r9oaN+3aBttAhkzTbwuAsyWzj053RbGD9p1kiKhOFwc97iXKl2RWHkfn4vlUG1KyvqHPP7ZnqpEo6eS1yPIq0vwSB1fI; 3:4eSkF3CTY44Zn07v3vGA/yce3SLCkFjFSU6xchQ1j0YaBP8LgRBjnCunoXE5XyN1oE10QOFF67n1Po6RdKUIlad/+HweN0VolJQ93MTk7PuCdfJW95hjz9RRc2kEWInq; 25:fZXv3rgT5cQo46ZGEPtr2NNta7qV6oJqMR2gWKIGt+InU4zpVsnsJA40bZ9G3umRBzGuZDSosxeTPWhXnki7RqcL92c0ymFnASkBmi4GxEQ+NwvewgsNPWKF72FZc79Up4QteC6Iugda7203agZb4KE25e7rZ/7mFIsIxpC1cQr2M/6oUzHPaLTFgRtKImUCKorCNk18sqG4sKwFC28ZBTr0peyEBhxKVsg0N++J9pJ8789S0keAZGy4KwxlecTbdVNnbPSOzUXdM9GdmeWQlt0ApEyI6LUulyyBEVRSp1puXW7rtAA8UAe9MkXsTYg2779bHBhI8GSiN/7f8DOBdgle0CkMhATItM8ztUdbOd8U4UstxmqpOSKyvx5cC5LH9NvPSyl9KddLuL3uC6A5aQJZ+f1BAjMegbUziJWsQO4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2246; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2246; 20:XAT0OeQX75LukEDDhjxktfL2aMVh+gG3mzfs/5XgSSP4gFawVubzc24BMd0bc5/p2quzWVEqFudqQc7Clo0OF6xrKfM0QJ441ZBEKGgtx34mX+o6/MklKVl6W9cQflhIm6kwGjMZOSRG4cOva/WMrK+wmZZNj61VaZMp1qt5fa98bpIZnHg8Jp6hkfC1dW7adXNqfMC4KJCkoQrNVfv4rcBlKjllxuVimLr/YaIMiHUeKtKvdt9X5r8OZijK+1UQmGvMUG71SG5OllF9vLBnEpSM1ZQhuOFSrH6XMViC82bVCAAafeedjtP20uZHNO/pmzl3gvFszOebJiOhGt7Q1mOA3wkgwW4KbSIU/snlqZwNDNE+jrYxfk50irfX6KTUAYJg8UwIE1PRpw6JdYowGAa+B+Uf78fwrrZW9xvGkTJKTCp6tiue4685tLi5UdfBG+59OPTS8x/pxyTKfLyMZUwjWCX6r3WZb7B6Q8wBKdwIMBut+ffS1cnfVRWOCg3hlFjVkhZWG+vfdqRTZ73u3K99nPpfQSJLJ9AW2/+cxeVd9rNnig6ef2/kaYOYqFwP5ZBNMf2Bu5d3roGz2BjhwUWtvg9r1dcAAHeRA2CGN0I= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR07MB2246; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2246; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2246; 4:NKHocvSq18OA/tYa4RH0DoZhCbYTqUnOD6XM/ZJJgHvz1oKxp75vC+U7t3GQRq4zLKFGRbQ+H2h7pJZjZJ0sk96QGSS1djEaH8VpE/0/H5CyS8J48u7HmyjODJUR+y5sfDRqpKgDsFVuMUGk+bn0se9mzEmA97cNx/CZ3483OOmnMk4XBtedvFEaBKRCV9Ec61WpnI2k+pNgyM3D39LbQAXUN/v0JLPqLejhqxZrCOnGpEYoaAiZ1SJKAbWp+UwvkkFColEariZSe+aBHwUybrXGlfnaFuwZFk2trRRX7V/d4T9OqlfWpdsEGK9J6urLBFPUlnOiz1bp8lk6CqlZUw6Hke0j2vpChDt25YTbdd9UyzwG6g/rl77/YtUy1En0 X-Forefront-PRVS: 09760A0505 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(92566002)(2950100001)(33646002)(50466002)(8676002)(81166006)(81156014)(48376002)(77096005)(106356001)(105586002)(5003940100001)(101416001)(5004730100002)(229853001)(66066001)(47776003)(2201001)(36756003)(42186005)(76176999)(50986999)(76506005)(97736004)(5001770100001)(50226002)(586003)(107886002)(3846002)(4326007)(189998001)(6116002)(68736007)(2906002)(7846002)(19580405001)(19580395003)(4001430100002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2246; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2246; 23:+1PEGoXziJgofJ8qKYNcH0onSRnP1pWGqFIGJueiO?= =?us-ascii?Q?lrQcGq/Uf5R7Q9H2pnqh4LJ/4auRRafAr24X2GwDk0IF2JqOeXYgfjnN92rb?= =?us-ascii?Q?aHjympn5KrOdAxSckaE41Axfw9oYGVjaIL4pX2muKOjujkXzXJ8qVC4FshHy?= =?us-ascii?Q?j7cgfi2YK2jwMtWTVLiBigpZVtW8c0qJrY+C87tBD6UnlySUqQQVLPEqg03v?= =?us-ascii?Q?VQCaDFi1UQq6txpig6TvUNEwmudBQxmcpOriC8cP4/NNr0/qAqo7NiXG0FjE?= =?us-ascii?Q?xFDMbVfrCqR+toAklwMCiGmoodYu+sFGQElyHKciaGPPk5LmjXTSrLIPdt0R?= =?us-ascii?Q?EPXfzSVChdxmVBzmYmNl/+eMI9g/ZShxs5YH15W8Ka6kPNiq657V8QzXtlSY?= =?us-ascii?Q?fzvC53BFbqo5/oyXdtF+taG1o6m5vYIwbHrjdXKyrDuL2xH/rsNJNikPlF6K?= =?us-ascii?Q?YpBCHtI0yES4Wz1IVLAnqEQyXiHtspO29HScntLCz479EymggYHqm0ID949s?= =?us-ascii?Q?bWfoyQEshtgtT6bvbEqZOsYIfswc3HHGT8lrySt2wwb0ABvV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eL1lEAkuCna6kiCQE=; 5:y+9UXq2IC3c9NIzFKKPbbDGFyoxTzo/6MNIcOLCcDLM4AIkBKvia9cFap698s6u8roDbIUlgQZpVLbW+stHZYm/cDeq878q+YapSgM7mTJdnS9hlrSWUbS+PXwaDdG3GyGZi7srSkHY3tuckIjE55A==; 24:QJGa0J1UjhPg4PbBRoS/7KgMrNsuZRo3H8OC7KVXOphHLyqE1WGtc+E0dnRJZHgFpxeVLKDWvefIihMyeWlF+GeUV8S4W9Cohq8gYmtpv68=; 7:WFDmrfmyxhcRhFSN1gZsosP3OZZ+5/8hE4qvYxVb64xVAooVpO0pWCFgGnGTVIhsu4BBKTOFt2fhDbMo3RTHgG+tgCTo8BF6aBXeun3Md9gZ8FhKBha07QF1JYQKouNxxvgaBugJYKuHOKJZUN1Ocz4QneYuhJutE0J5TDX2/YvDwPXYrxiItwGcKy7oSBSnB6O8wC1AwR3UdmFaT4elXw== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2016 23:55:01.3464 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2246 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.7.4 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