Linux SNPS ARC Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: libc-alpha@sourceware.org
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	linux-snps-arc@lists.infradead.org
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	[thread overview]
Message-ID: <20200306182419.13945-18-vgupta@synopsys.com> (raw)
In-Reply-To: <20200306182419.13945-1-vgupta@synopsys.com>

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 .../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
+   <http://www.gnu.org/licenses/>.  */
+
+#include <bits/wordsize.h>
+
+#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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <bits/wordsize.h>
+
+/* 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 <sysdeps/arc/sysdep.h>
 #include <sysdeps/unix/sysv/linux/generic/sysdep.h>
 
+/* 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 <dl-sysdep.h>
 
-- 
2.20.1


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

  parent reply	other threads:[~2020-03-06 18:24 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 18:24 [PATCH v3 00/17] glibc port to ARC processors Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros Vineet Gupta
2020-03-07  0:12   ` Joseph Myers
2020-03-07  0:21     ` Vineet Gupta
2020-03-10 17:23       ` sourceware account access (was Re: [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros) Vineet Gupta
2020-03-10 17:57         ` Carlos O'Donell
2020-03-10 18:08           ` sourceware account access Vineet Gupta
2020-03-10 18:10             ` Carlos O'Donell
2020-03-11  2:00     ` [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros Vineet Gupta
     [not found]   ` <d3d2969f-4370-588b-b9be-a9ae0d38e10e@openwall.com>
2020-03-09 23:38     ` Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 02/17] ARC: add definitions to elf/elf.h Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 03/17] ARC: ABI Implementation Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 04/17] ARC: startup and dynamic linking code Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 05/17] ARC: Thread Local Storage support Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 06/17] ARC: Atomics and Locking primitives Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 07/17] ARC: math soft float support Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 08/17] ARC: hardware floating point support Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 09/17] ARC: Linux Syscall Interface Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 10/17] ARC: Linux ABI Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 11/17] ARC: Linux Startup and Dynamic Loading Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 12/17] ARC: ABI lists Vineet Gupta
2020-03-07 15:20   ` Florian Weimer
2020-03-08  5:45     ` Vineet Gupta
2020-03-09  9:14       ` Florian Weimer
2020-03-06 18:24 ` [PATCH v3 13/17] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 14/17] ARC: Build Infrastructure Vineet Gupta
2020-03-07  0:16   ` Joseph Myers
2020-03-07  0:24     ` Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 15/17] build-many-glibcs.py: Enable ARC builds Vineet Gupta
2020-03-06 18:24 ` [PATCH v3 16/17] NEWS: mention ARC port Vineet Gupta
2020-03-07  0:14   ` Joseph Myers
2020-03-07  0:55     ` Vineet Gupta
2020-03-07  1:08       ` Joseph Myers
2020-03-07  1:26         ` Vineet Gupta
2020-03-07  1:29           ` Joseph Myers
2020-03-06 18:24 ` Vineet Gupta [this message]
2020-03-07  0:19   ` [PATCH v3 17/17] ARC: changes to enable 64-bit time_t, off_t, ino_t etc Joseph Myers
2020-03-07  0:37     ` Vineet Gupta
2020-03-07  0:21 ` [PATCH v3 00/17] glibc port to ARC processors Joseph Myers
2020-03-07  0:57   ` Vineet Gupta
2020-03-07  1:10     ` Joseph Myers
2020-03-12 21:23       ` Vineet Gupta
2020-03-12 21:46         ` Joseph Myers
2020-03-23 18:20           ` Vineet Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200306182419.13945-18-vgupta@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-snps-arc@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox