From patchwork Wed Aug 19 15:38:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 40290 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B2882384242C; Wed, 19 Aug 2020 15:48:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2882384242C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1597852139; bh=jvBqjN7SGGGbjXAlBLpaStcNLhC/u91kTqld3WgpBQE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xhgOLMrgWuwXnTlQfb038OalS+spDCKfYQWX53n9+WWidXgvi1jbCScX6KMOTClx4 x3j/MxZKsm1pE4dHBmXwUfuX4QUa20MiLs3UNxl+xNad4rFYJGGn5RP383TKT5s6SS 6raHGvicGZU99axx7Ms4wmvRZuwItjCw7u3Fe+O0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by sourceware.org (Postfix) with ESMTPS id 3D54A384243A for ; Wed, 19 Aug 2020 15:48:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3D54A384243A IronPort-SDR: ILajfoeCjcdQpL49mQUwTLQALZc+AtXKEKe9hmveXTV0WX03RBvSB4hLE+I1hSFRfjHaA+aKpC p8miwdjaC+/eLWurHKDqsj8pL/IeglBXtqsbTFV6CDM9KreUrJcmBOeNQxi8KEBMfZQArxpMOV NWdUVRWv8dFcG9awaO8wRlh+OGyGhgV2e5Y4KIrWoS7KpJnqGYM/wlmQ2sigBWqa6qviI+na0/ VYWGTHn8byyCPdXphDwcQnuafTQts+1Bw/Td6Trf43gyuconj+IvIVP5wnKaV+9ZCvhg3AnPPP QAk= X-IronPort-AV: E=Sophos;i="5.76,331,1592841600"; d="scan'208";a="254766930" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 19 Aug 2020 23:48:55 +0800 IronPort-SDR: TeihnSsPR2rXb1DLnLOUpG+Tel/YP8OKvvlDvAZHmEyEpxdpLFb+AxIg35qpMMxhmrjDt5Mycl IQJHbg3zwEXA== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2020 08:35:53 -0700 IronPort-SDR: 5yiNnDe2beOD0boiO0kX9vo4mNV5eknlSLFid9lK3mR74XAga//v6AO8jLI8Jg14/ys4mRMHGT 6YUNTXQjPWTQ== WDCIronportException: Internal Received: from lpt-kalia-a.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.59.58]) by uls-op-cesaip01.wdc.com with ESMTP; 19 Aug 2020 08:48:55 -0700 To: libc-alpha@sourceware.org Subject: [PATCH v5 03/17] RISC-V: Use 64-bit-time syscall numbers with the 32-bit port Date: Wed, 19 Aug 2020 08:38:46 -0700 Message-Id: <1a107e4065f6d0e56dd8ae1bf9613a86ba8dbec5.1597851293.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alistair Francis via Libc-alpha From: Alistair Francis Reply-To: Alistair Francis Cc: alistair.francis@wdc.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" sysdep.h redefines only the syscall where the generic implementation still does not have actual 64-bit time_t support: /* Workarounds for generic code needing to handle 64-bit time_t. */ /* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */ #define __NR_clock_getres __NR_clock_getres_time64 /* Fix sysdeps/nptl/lowlevellock-futex.h. */ #define __NR_futex __NR_futex_time64 [...] This patch also adds a comment that it is a workaround to handle 64-bit time_t and on each #define comment for which implementation it intends to. Reviewed-by: Maciej W. Rozycki --- sysdeps/unix/sysv/linux/riscv/sysdep.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index fbb3a02bbd..430fa23a58 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -25,6 +25,29 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name +#if __WORDSIZE == 32 + +/* Workarounds for generic code needing to handle 64-bit time_t. */ + +/* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */ +#define __NR_clock_getres __NR_clock_getres_time64 +/* Fix sysdeps/nptl/lowlevellock-futex.h. */ +#define __NR_futex __NR_futex_time64 +/* Fix sysdeps/unix/sysv/linux/pause.c. */ +#define __NR_ppoll __NR_ppoll_time64 +/* Fix sysdeps/unix/sysv/linux/select.c. */ +#define __NR_pselect6 __NR_pselect6_time64 +/* Fix sysdeps/unix/sysv/linux/recvmmsg.c. */ +#define __NR_recvmmsg __NR_recvmmsg_time64 +/* Fix sysdeps/unix/sysv/linux/sigtimedwait.c. */ +#define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64 +/* Fix sysdeps/unix/sysv/linux/semtimedop.c. */ +#define __NR_semtimedop __NR_semtimedop_time64 +/* Hack sysdeps/unix/sysv/linux/generic/utimes.c. */ +#define __NR_utimensat __NR_utimensat_time64 + +#endif /* __WORDSIZE == 32 */ + #ifdef __ASSEMBLER__ # include