From patchwork Wed Aug 12 14:40:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 40252 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 83CB6384A40A; Wed, 12 Aug 2020 14:50:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83CB6384A40A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1597243856; bh=vPtecCvoogQJzKBUVCtYAyhFFvTC/Jzek4sdwLmzMO0=; 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=bPfUrxjgyvehJh3ol7ADQA/IPmqBXta+7GbpwpnVqTL8DGBxwea2yfziRvMDFbYmz 8BE4ecyVg4qWb0DllzM629s3ipeKjtk/WzN+5TxyYl9biDoZMpw68aiYutJxKsXFIU qmtbpIpqtVxTs2S2VR2WdO68LZDksoWJyN9Exs7k= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by sourceware.org (Postfix) with ESMTPS id 884D6384B061 for ; Wed, 12 Aug 2020 14:50:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 884D6384B061 IronPort-SDR: Xi0Dmx3wcEz4rcXFxd5K7yRYJjjh66pKr7bmyaJR2HpEseeb5Wsr/huYC+5bQC0YUC/V0Wqwkf ga8oCd3Ht2Hwbvc+NJs11PxWYmI97SxpFLY3tMKYl89c2boyCLM7GjTFsW86GHK8mpb5ahk1s3 uoCWcnd1Txc/OTe/FVuA0ck8hS7utIEbGF8E8OwT8v/0tNuwNvWeXn3CaG1xM5UKA4voyEioUH j8rxnZg/tV1i0DCluqzsk2ASp5eoEooUEvxNYU822+twKyNcmy6XS+fEnkKLLH1iWdGMFu01Q4 n+s= X-IronPort-AV: E=Sophos;i="5.76,304,1592841600"; d="scan'208";a="145996641" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 12 Aug 2020 22:50:55 +0800 IronPort-SDR: Em60XGmTZZQXgX60wjPWweXzdw2lq26QRqM60JHddW3Zu2FVVhXn6vzdzgp/AhjSwG1bCrzYDE ysjWjP1SRYXA== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 07:38:45 -0700 IronPort-SDR: Ry21fiY3vothTtUyHItx8TJvcxrDqDSMdTJ10jCsqExSl/QusAXcu/mpoB8+rwNCvJ/y+oaiz9 tyuSiwJF8AZA== WDCIronportException: Internal Received: from jbfyk72.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.59.14]) by uls-op-cesaip01.wdc.com with ESMTP; 12 Aug 2020 07:50:53 -0700 To: libc-alpha@sourceware.org Subject: [PATCH v4 03/18] RISC-V: Use 64-bit-time syscall numbers with the 32-bit port Date: Wed, 12 Aug 2020 07:40:54 -0700 Message-Id: <381d1ef50e78d85ef07761f6041fec544d430b01.1597243100.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 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: macro@wdc.com, 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. --- 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 fbc2436691..292484b303 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -22,6 +22,29 @@ #include #include +#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 */ + #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name