From patchwork Mon Oct 27 07:59:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 39593 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A22352118A for ; Mon, 27 Oct 2014 08:05:40 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id x13sf632782wgg.5 for ; Mon, 27 Oct 2014 01:05:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:cc:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=k3mx+C3w5Hn+LhpwYFAH7PKldx4fmzVMClKYWkr5QXI=; b=ZLx9G7akourqCotYPNk0S022DDDOSLqKWlJBbz9piRIJyiorSZ4YsKaOMmAp50JEQA i8mB5WdbMbckl+XojMuVwlY9KPy1Yejq+vmWdxNvtedVb9IQ4xIRZWNjOsbo62dMFEiW oTNXtj+1/b0/jR+Z4lXEMJbXTOW3beVFEo5lbdKjSu5L+mWh2beWtS7fW9iozbyIv9WP cW8SDK/7fX68SPp/mgXXOyfLKDNVela2lgiyFQPI+36vD6XyQ4FKiDFCeIDc2sD9n5A/ d47pWaT7HU+hUarKlQZnroxTG7Z8GaCQxwEScmFQSe+7f86fDarxeQuVHJlinqPuFnTY LuKQ== X-Gm-Message-State: ALoCoQlOSCpISL0uRao6rIXBBKVCxxqb5Fi6LevZ4DJXOGalAE0Ady8Oo1xnF4DRVHGrpaxKM1xO X-Received: by 10.112.89.195 with SMTP id bq3mr181033lbb.9.1414397139747; Mon, 27 Oct 2014 01:05:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.134 with SMTP id s6ls310399las.27.gmail; Mon, 27 Oct 2014 01:05:39 -0700 (PDT) X-Received: by 10.152.116.102 with SMTP id jv6mr21790268lab.40.1414397139606; Mon, 27 Oct 2014 01:05:39 -0700 (PDT) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com. [2a00:1450:4010:c04::232]) by mx.google.com with ESMTPS id f6si18755451lbc.6.2014.10.27.01.05.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 01:05:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::232 as permitted sender) client-ip=2a00:1450:4010:c04::232; Received: by mail-lb0-f178.google.com with SMTP id f15so1552745lbj.9 for ; Mon, 27 Oct 2014 01:05:39 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr21394497laz.27.1414397139487; Mon, 27 Oct 2014 01:05:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp247839lbz; Mon, 27 Oct 2014 01:05:36 -0700 (PDT) X-Received: by 10.67.30.72 with SMTP id kc8mr23004467pad.13.1414397135836; Mon, 27 Oct 2014 01:05:35 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id om9si9862891pdb.171.2014.10.27.01.05.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 01:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-53825-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 31666 invoked by alias); 27 Oct 2014 08:03:27 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 31566 invoked by uid 89); 27 Oct 2014 08:03:26 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-ie0-f170.google.com X-Received: by 10.107.168.15 with SMTP id r15mr541561ioe.66.1414397001086; Mon, 27 Oct 2014 01:03:21 -0700 (PDT) From: Andrew Pinski To: libc-alpha@sourceware.org Cc: Andrew Pinski Subject: [PATCH 28/29] [AARCH64] Add typesizes.h for ILP32 Date: Mon, 27 Oct 2014 00:59:52 -0700 Message-Id: <1414396793-9005-29-git-send-email-apinski@cavium.com> In-Reply-To: <1414396793-9005-1-git-send-email-apinski@cavium.com> References: <1414396793-9005-1-git-send-email-apinski@cavium.com> X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::232 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 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. --- sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h | 135 ++++++++++++++++++++++ 1 files changed, 135 insertions(+), 0 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h 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..f8e3206 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h @@ -0,0 +1,135 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/AARCh64 version. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + 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. */ + +/* ILP32 kernel interface is 64-bit. */ +#ifndef __LP64__ +# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE +# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE +#else +# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#endif +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __SYSCALL_ULONG_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE +#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __SWBLK_T_TYPE __SYSCALL_SLONG_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]; } +#define __SSIZE_T_TYPE __SLONGWORD_TYPE + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* 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 + +/* Same for __blkcnt_t and __blkcnt64_t. */ +#define __BLKCNT_T_TYPE_MATCHES_BLKCNT64_T_TYPE 1 + +/* Same for __fsblkcnt_t and __fsblkcnt64_t. */ +#define __FSBLKCNT_T_TYPE_MATCHES_FSBLKCNT64_T_TYPE 1 + +/* Same for __fsfilcnt_t and __fsfilcnt64_t. */ +#define __FSFILCNT_T_TYPE_MATCHES_FSFILCNT64_T_TYPE 1 + +/* LP32 needs some padding in some cases */ + +#ifndef __LP64__ + +# undef __SIGINFO_INNER +# ifdef __AARCH64EB__ +# define __SIGINFO_INNER(type, field) \ + __extension__ struct { \ + int __pad_##field; \ + type field; \ + } __attribute__((aligned(8) )) +# else +# define __SIGINFO_INNER(type, field) \ + __extension__ struct { \ + type field; \ + int __pad_##field; \ + } __attribute__((aligned(8) )) +# endif + +# define __RUSAGE_LONG(__field) \ + __SIGINFO_INNER(long, __field) + +# define __SHMID_DS_SIZE_TYPE(__field) \ + __SIGINFO_INNER(size_t, __field) + +# undef __SIGINFO_VOIDPTR +# define __SIGINFO_VOIDPTR(field) \ + __SIGINFO_INNER(void*, field) + +# undef __SIGINFO_BAND +# define __SIGINFO_BAND(field) \ + __SIGINFO_INNER(long, field) + +#define __SIGSET_INNER_T __SYSCALL_ULONG_TYPE +#define __FD_MASK_TYPE __SYSCALL_SLONG_TYPE +#define __FD_MASK_CONST(a) (__extension__ a##ull) +#endif + + +#define __IPC_TIME_T_64_BITS + +#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) + + +#endif /* bits/typesizes.h */