From patchwork Tue Jun 21 05:07:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 70512 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1831964qgy; Mon, 20 Jun 2016 22:13:47 -0700 (PDT) X-Received: by 10.98.80.79 with SMTP id e76mr26505284pfb.67.1466486027445; Mon, 20 Jun 2016 22:13:47 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s1si8958093pan.105.2016.06.20.22.13.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 22:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-70823-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-70823-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-70823-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=dz+yj beARA3kTIIXU6P5nPObwZorI1YpP77pOCJaFgFID+tvdIuISXFPjTChUrINPz5qa aX2CUPAEPQeqlSrOkTG8dF923gLWKBeogI0VEfPPcuEXfLBbesZDkWvovcCcUNzC nSwu6NDvHn1e3ai762ShkVIXArar/C9GYYu5vM= 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=hbJhBiWNx01 yIEOyC3+WeHbiNXQ=; b=hNasDWFCEeBcpLIn9Vbt1ekRwFB1Ar4vGkdspRnuG61 t9R9RWxBp+06iNbGsJh8mVOowvnKquiY7Y6+pOe9M0wwEP8LqRdDJjgE88xPlrwa /vM67b6pbpTHWzOFdvZziWwzEsT7N8zmMiL8h6UhpTFBVt2GTFEW2nAK4Txpcpr0 = Received: (qmail 21865 invoked by alias); 21 Jun 2016 05:13:32 -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 20279 invoked by uid 89); 21 Jun 2016 05:13:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:4522, Never 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 , Yury Norov Subject: [PATCH 19/27] [AARCH64] Add typesizes.h for ILP32 Date: Tue, 21 Jun 2016 08:07:03 +0300 Message-ID: <1466485631-3532-21-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: HE1PR03CA0040.eurprd03.prod.outlook.com (10.163.170.178) To BN4PR07MB2242.namprd07.prod.outlook.com (10.164.63.148) X-MS-Office365-Filtering-Correlation-Id: 67f97851-2130-4451-a6c4-08d399927b88 X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2242; 2:xMcW2vXKOVHBVJXLxyTzCM9cpqd5tPVn801iguDB0HbHyRMpK7xEN6GwFy9gt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lEy4PhTLPvUz4aP6dME2uZ3G8ZJtcfpriJLYXI8A80wpuwSdt3eJ1vIO/05mBLHjuDPtMimYPMNWBdj6yCm10MbxSdfATsQmIXhc5RviMy+aBRHdsDwdZl5dRGkC5du3WPgxOqaJ4GfWyxLUrVn8g== X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2242; 20:wqwskwtirB7It3piPURUs924UfbWOX5R7G/woT83gnNtYttbUWloiYWGz8tqx/HsxmAyEOri5yNOvdXGMPvwbyeerinpz/iHWvfCmjwBdT9ImgwhVa55omH8eTqEv4a119qWbfPfDMxtXA9iVnJ4UyhpgNmW84TcMQcTtnDMi2o2THwTd9nLsq4JMVaoGxg8amLMayC9n8F+UoxL2ONs1VB6M18LR5e1tiXvnempdsWjSYAtROJ/TFfcMeEGb9DmbWTkVBBcvpUAoA4rVGAZvR7MBmHswq+xlYd/pONnlS768z1owRsuj9sEqS08wkGWG0GeHCNLCzTi8sSF6uqWq1q4+uQ+0iYjysEBQvuiVewpF5SFgBQ7/mmcCUYQyL8lEqv2MYjZKD6bmt2VD84H9ivc8YYjO93pVMjQe1EKBpdItmH4t7A+PXdOIBNeblS68dkeYBBLRh+YRJAaVghkvLIuvjwZPn3oddBJr8DFqU5yQ1sLozzffwWjo8ENTvIHp3N8yFliyOa5CfboMlwJ4TLBj0rX7byIqTaCfS8Lf7z/wn9UfKbxPpNiVyDEvWZNsLTXXHOv+7+4YXn688mDUnOkRYUE+EqkcQegKYaj8BE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:BN4PR07MB2242; BCL:0; PCL:0; RULEID:; SRVR:BN4PR07MB2242; X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2242; 4:zWIOdC50DGPXChMqZGLJ7mO7qrK0x94AJZg37w0W1Si2g7KTRJ0PefkJ6MTSjO3ZYpShW/Fn2rGltT1sXWQmSyuDazpUP66SYmGwKR+wWPKtgWZLeaMQHDAZWDZqus6OE2Z7tcM0CAo7sqQ8nBWsrL1JOsg3Km+YxBK0q3n5DwB0y+EgMVEweZKt37yFRagZsZnKdCAoRcCFZ1eZkr6HOHzqj8ZkVRNzJTbw/dRlpHYe8ZJ5E3GaELhQAhTFE/B9Trcbanf7Q+1GugyFo9pjKN1TU7ROEIt/GXNPgl43imUqp6A7Z82//JbyFY4pMi7UTlFKv+ryjDz0oyEFr6aqOZZnIShA9+5TlD5zEhcjdLvt0nk6DPX/One75U7U0WtnvskNCBD/3014GUi8OyIui0jd957lcyOKmwgz8a+ziG0kfiYg27sPIEXJkA6IKc/C X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(19580395003)(42186005)(19580405001)(77096005)(76506005)(229853001)(5003940100001)(7736002)(586003)(3846002)(6116002)(4001430100002)(105586002)(92566002)(81156014)(107886002)(2906002)(48376002)(5001770100001)(4326007)(2950100001)(76176999)(7846002)(50986999)(66066001)(50466002)(15975445007)(33646002)(50226002)(47776003)(8676002)(101416001)(106356001)(36756003)(189998001)(97736004)(68736007)(81166006)(2004002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR07MB2242; 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; BN4PR07MB2242; 23:iJfd+cBmD4vHCVN9OPMAAiWoZMfHZLX0dScwpOhZc?= =?us-ascii?Q?B+AUec5yc7EtUMFwzo7cqPn0xvRlTthNSCtB++zbKsU901jW2KbNOMqi0Tko?= =?us-ascii?Q?i/63BtNDN9OWrHhlGupn7nTMOHtvEogbjgVUf1fvdp33v/CG5Dp7djOJVGV3?= =?us-ascii?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-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 05:11:20.2006 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2242 From: Andrew Pinski The generic typesizes does not work for ILP32 as the kernel long type needs to be long long (quad). time_t, off_t, clock_t, suseconds_t, ino_t, rlim_t are 64bits. FDSET bitmask is a 64bit type. * sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h: New file. Signed-off-by: Yury Norov --- sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h | 79 ++++++++++++++++++++++++ sysdeps/unix/sysv/linux/sysdep-vdso.h | 4 +- 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h b/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h new file mode 100644 index 0000000..844da49 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h @@ -0,0 +1,79 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/AARCh64 version. + Copyright (C) 2011-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SQUAD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __S32_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +/* ssize_t is always singed long in both ABIs. */ +#define __SSIZE_T_TYPE __SLONGWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __LP64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ diff --git a/sysdeps/unix/sysv/linux/sysdep-vdso.h b/sysdeps/unix/sysv/linux/sysdep-vdso.h index e8c4a7b..351d6bb 100644 --- a/sysdeps/unix/sysv/linux/sysdep-vdso.h +++ b/sysdeps/unix/sysv/linux/sysdep-vdso.h @@ -37,7 +37,7 @@ __label__ out; \ __label__ iserr; \ INTERNAL_SYSCALL_DECL (sc_err); \ - long int sc_ret; \ + __syscall_slong_t sc_ret; \ \ __typeof (__vdso_##name) vdsop = __vdso_##name; \ PTR_DEMANGLE (vdsop); \ @@ -64,7 +64,7 @@ # define INTERNAL_VSYSCALL(name, err, nr, args...) \ ({ \ __label__ out; \ - long v_ret; \ + __syscall_slong_t v_ret; \ \ __typeof (__vdso_##name) vdsop = __vdso_##name; \ PTR_DEMANGLE (vdsop); \