All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: libc-alpha@sourceware.org, arnd@arndb.de
Cc: alistair23@gmail.com, Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	linux-snps-arc@lists.infradead.org, lukma@denx.de
Subject: [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches
Date: Mon, 24 Feb 2020 10:34:13 -0800	[thread overview]
Message-ID: <20200224183413.13629-1-vgupta@synopsys.com> (raw)

This provides better out-of-box support for 32-bit arches with 64-bit
time_t

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 sysdeps/unix/sysv/linux/generic/sysdep.h | 48 ++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h
index 23defce7c3e1..27b0079a2a71 100644
--- a/sysdeps/unix/sysv/linux/generic/sysdep.h
+++ b/sysdeps/unix/sysv/linux/generic/sysdep.h
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <bits/wordsize.h>
+#include <bits/timesize.h>
 #include <kernel-features.h>
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
@@ -33,3 +34,50 @@
 #define __NR_pread __NR_pread64
 #define __NR_pwrite __NR_pwrite64
 #endif
+
+/* Override syscalls for asm-generic ABIs with 64-bit time.  */
+#if __WORDSIZE == 32 && __TIMESIZE == 64
+
+# undef __NR_futex
+# define __NR_futex __NR_futex_time64
+
+# undef __NR_rt_sigtimedwait
+# define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64
+
+# undef __NR_ppoll
+# define __NR_ppoll __NR_ppoll_time64
+
+# undef __NR_utimensat
+# define __NR_utimensat __NR_utimensat_time64
+
+# undef __NR_pselect6
+# define __NR_pselect6 __NR_pselect6_time64
+
+# undef __NR_recvmmsg
+# define __NR_recvmmsg __NR_recvmmsg_time64
+
+# undef __NR_semtimedop
+# define __NR_semtimedop __NR_semtimedop_time64
+
+# undef __NR_mq_timedreceive
+# define __NR_mq_timedreceive __NR_mq_timedreceive_time64
+
+# undef __NR_mq_timedsend
+# define __NR_mq_timedsend __NR_mq_timedsend_time64
+
+# undef __NR_clock_getres
+# define __NR_clock_getres __NR_clock_getres_time64
+
+# undef __NR_timerfd_settime
+# define __NR_timerfd_settime __NR_timerfd_settime64
+
+# undef __NR_timerfd_gettime
+# define __NR_timerfd_gettime __NR_timerfd_gettime64
+
+# undef __NR_sched_rr_get_interval
+# define __NR_sched_rr_get_interval __NR_sched_rr_get_interval_time64
+
+# undef __NR_clock_adjtime
+# define __NR_clock_adjtime __NR_clock_adjtime64
+
+#endif
-- 
2.20.1


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

             reply	other threads:[~2020-02-24 18:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 18:34 Vineet Gupta [this message]
2020-02-25  0:59 ` [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches Alistair Francis
2020-02-25  1:16   ` Vineet Gupta
2020-02-25  9:27 ` Florian Weimer
2020-03-11 18:44   ` Vineet Gupta
2020-03-12 18:33   ` [PATCH v2] Force 64-bit time based syscalls for TIMESIZE==64 Vineet Gupta
2020-03-31 21:47     ` [PATCH v3] Make any 32-bit time based syscalls unavailable " Vineet Gupta
2020-04-06 18:54       ` Vineet Gupta
2020-04-13 21:12         ` Vineet Gupta
2020-04-18  0:28           ` Vineet Gupta
2020-04-18 16:50             ` Florian Weimer
2020-04-22 23:01               ` 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=20200224183413.13629-1-vgupta@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=alistair23@gmail.com \
    --cc=arnd@arndb.de \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=lukma@denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.