From patchwork Fri Mar 6 18:24:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1250558 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-110356-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=C3oklSmB; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=IJN8KpTa; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Ywzx42JPz9sPR for ; Sat, 7 Mar 2020 05:26:21 +1100 (AEDT) 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-transfer-encoding; q=dns; s= default; b=PdPvCLXLs/MGJkOB8PZhhOV0WJ2MnRq7ZBsrYNw1aHYfATgxkS0hA wkQWK2KgBfsMSB73CfsQzSXxV8Gm19leRGPaFwn3iOZuCb31TV7wWHiXU5fCmEEE x/kNoyAOLIjR7o++DgySeeplwLqDHoouQ5BUFKrhHyd7b5lVj9+PUY= 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-transfer-encoding; s=default; bh=42AIQ66XFIzAwZs03ST1VoTv7q0=; b=C3oklSmBCff7+TufMh52tF3i8ofz gQE0IsUoFePPxCHePKpKxd/oQ5cB+VsxoAUuaUax2Gd0lJKoCAwDUY+RuI/wBwUz KYHcVKrjaL4FaQ15sAEPOJekaviukaIT6G1DYE1LvoPV880YTCzb/RqGa37jW1dW paR65kA/i+Chpy0= Received: (qmail 124479 invoked by alias); 6 Mar 2020 18:25:05 -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 123479 invoked by uid 89); 6 Mar 2020 18:24:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT autolearn=ham version=3.3.1 spammy=explict, 20192020, HX-Languages-Length:6913 X-HELO: smtprelay-out1.synopsys.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1583519068; bh=bLPhwK/uyXv5STMjWdMbYozeJaQn/2CfXOn2ABQU+zQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IJN8KpTanhzIwUiSJqMKhsJJbyb3/GXASBP+QsuXM3LhtCt0vfR3l8K2SLQE4Kay3 Utj97rkeSD1eeLYw2zPDW09b7dBhUK6isFt4o/9m6SC7F2xg6nXVEuEqtaXaOPiWRr Nrg8Kjf0HBRizL7nzJZa9fjEsMWEpstOXyc3B4wrwyQvRKGi4OyYHxQLyuNnDt8xmP Y10x7r14Xtf4PPeJCG9Y+w81bSV9tFdkGuSqMCtAHyT+CajUH/6kF/wLFopR4UtgU3 QNosS6lMEuolY4h4s5c+xFUpFqOBqMsDY2efsKVEiT4oiww9vBI/oOQG/XoSPjCdcl z1mlWUx5HvLNw== From: Vineet Gupta To: libc-alpha@sourceware.org Cc: linux-snps-arc@lists.infradead.org, Vineet Gupta Subject: [PATCH v3 17/17] ARC: changes to enable 64-bit time_t, off_t, ino_t etc Date: Fri, 6 Mar 2020 10:24:19 -0800 Message-Id: <20200306182419.13945-18-vgupta@synopsys.com> In-Reply-To: <20200306182419.13945-1-vgupta@synopsys.com> References: <20200306182419.13945-1-vgupta@synopsys.com> MIME-Version: 1.0 Signed-off-by: Vineet Gupta --- .../sysv/linux/arc/bits/socket-constants.h | 4 +-- sysdeps/unix/sysv/linux/arc/bits/timesize.h | 21 +++++++++++++++ sysdeps/unix/sysv/linux/arc/c++-types.data | 16 ++++++------ sysdeps/unix/sysv/linux/arc/configure | 2 +- sysdeps/unix/sysv/linux/arc/configure.ac | 2 +- sysdeps/unix/sysv/linux/arc/kernel_stat.h | 26 +++++++++++++++++++ sysdeps/unix/sysv/linux/arc/libc.abilist | 6 ++--- sysdeps/unix/sysv/linux/arc/sysdep.h | 12 +++++++++ 8 files changed, 74 insertions(+), 15 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/arc/bits/timesize.h create mode 100644 sysdeps/unix/sysv/linux/arc/kernel_stat.h diff --git a/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h index 053b5cee399a..74b0c06edb36 100644 --- a/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h @@ -30,9 +30,9 @@ #define SO_OOBINLINE 10 #define SO_RCVBUF 8 #define SO_RCVLOWAT 18 -#define SO_RCVTIMEO 20 +#define SO_RCVTIMEO 66 #define SO_REUSEADDR 2 #define SO_SNDBUF 7 #define SO_SNDLOWAT 19 -# define SO_SNDTIMEO 21 +# define SO_SNDTIMEO 67 #define SO_TYPE 3 diff --git a/sysdeps/unix/sysv/linux/arc/bits/timesize.h b/sysdeps/unix/sysv/linux/arc/bits/timesize.h new file mode 100644 index 000000000000..1259077c6412 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arc/bits/timesize.h @@ -0,0 +1,21 @@ +/* Bit size of the time_t type at glibc build time, general case. + Copyright (C) 2019-2020 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 + . */ + +#include + +#define __TIMESIZE 64 diff --git a/sysdeps/unix/sysv/linux/arc/c++-types.data b/sysdeps/unix/sysv/linux/arc/c++-types.data index 303f4570c8ee..0fb0143ae746 100644 --- a/sysdeps/unix/sysv/linux/arc/c++-types.data +++ b/sysdeps/unix/sysv/linux/arc/c++-types.data @@ -1,5 +1,5 @@ blkcnt64_t:x -blkcnt_t:l +blkcnt_t:x blksize_t:i caddr_t:Pc clockid_t:i @@ -8,14 +8,14 @@ daddr_t:i dev_t:y fd_mask:l fsblkcnt64_t:y -fsblkcnt_t:m +fsblkcnt_t:y fsfilcnt64_t:y -fsfilcnt_t:m +fsfilcnt_t:y fsid_t:8__fsid_t gid_t:j id_t:j ino64_t:y -ino_t:m +ino_t:y int16_t:s int32_t:i int64_t:x @@ -26,7 +26,7 @@ loff_t:x mode_t:j nlink_t:j off64_t:x -off_t:l +off_t:x pid_t:i pthread_attr_t:14pthread_attr_t pthread_barrier_t:17pthread_barrier_t @@ -44,13 +44,13 @@ pthread_t:m quad_t:x register_t:i rlim64_t:y -rlim_t:m +rlim_t:y sigset_t:10__sigset_t size_t:j socklen_t:j ssize_t:i -suseconds_t:l -time_t:l +suseconds_t:x +time_t:x u_char:h uid_t:j uint:j diff --git a/sysdeps/unix/sysv/linux/arc/configure b/sysdeps/unix/sysv/linux/arc/configure index f74fa7cb0259..56ec14357507 100644 --- a/sysdeps/unix/sysv/linux/arc/configure +++ b/sysdeps/unix/sysv/linux/arc/configure @@ -1,4 +1,4 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/arc. -arch_minimum_kernel=3.9.0 +arch_minimum_kernel=5.1.0 diff --git a/sysdeps/unix/sysv/linux/arc/configure.ac b/sysdeps/unix/sysv/linux/arc/configure.ac index a9528032d32a..8af5a12cc248 100644 --- a/sysdeps/unix/sysv/linux/arc/configure.ac +++ b/sysdeps/unix/sysv/linux/arc/configure.ac @@ -1,4 +1,4 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/arc. -arch_minimum_kernel=3.9.0 +arch_minimum_kernel=5.1.0 diff --git a/sysdeps/unix/sysv/linux/arc/kernel_stat.h b/sysdeps/unix/sysv/linux/arc/kernel_stat.h new file mode 100644 index 000000000000..8fdd86b9e843 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arc/kernel_stat.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2020 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 + . */ + +#include + +/* Needed to elide the itemized copy code in common xstatconv.c. */ +#define STAT_IS_KERNEL_STAT 1 + +/* Nice side-effect of 64-bit time_t switch is these are same. */ +#define XSTAT_IS_XSTAT64 1 + +#define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist index a95b31434496..1e554c5be072 100644 --- a/sysdeps/unix/sysv/linux/arc/libc.abilist +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -1,7 +1,7 @@ GLIBC_2.32 _Exit F -GLIBC_2.32 _IO_2_1_stderr_ D 0x98 -GLIBC_2.32 _IO_2_1_stdin_ D 0x98 -GLIBC_2.32 _IO_2_1_stdout_ D 0x98 +GLIBC_2.32 _IO_2_1_stderr_ D 0x9c +GLIBC_2.32 _IO_2_1_stdin_ D 0x9c +GLIBC_2.32 _IO_2_1_stdout_ D 0x9c GLIBC_2.32 _IO_adjust_column F GLIBC_2.32 _IO_adjust_wcolumn F GLIBC_2.32 _IO_default_doallocate F diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h index 77d815e882e5..9cd12a86a950 100644 --- a/sysdeps/unix/sysv/linux/arc/sysdep.h +++ b/sysdeps/unix/sysv/linux/arc/sysdep.h @@ -22,6 +22,18 @@ #include #include +/* ARC's version of asm-generic syscall ABI does provide fstat64 and fstatat64 + but it not compatible with glibc 64-bit time_t based stat64. So undef them + to allow generic code to pick up statx syscall based wrappers which do the + explict interworking. + Similarly futex32 exists and works but we'd rather use futex64. But lll code + using futex expects __NR_futex hence the forced redefine + */ +#undef __NR_fstat64 +#undef __NR_fstatat64 +#undef __NR_futex +#define __NR_futex __NR_futex_time64 + /* For RTLD_PRIVATE_ERRNO. */ #include