From patchwork Mon Feb 24 18:34:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1243424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=fqKUA7ll; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=XHKeuGEp; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48R9hM57R3z9sNg for ; Tue, 25 Feb 2020 05:34:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=js5c/AaDao6sxO4aHWtQVFna1ooyYs7FeJQWKlKoRU0=; b=fqKUA7lln9ZATl vCyEkFlZ4cZ4abIjsMuMv8eTO9AlXH+QvxKLWtQrzDuM9giqcqCzqC81RPP39IePGbvacwMngMfUI /GwiKmg/WWVVJqdb6+1SPfW98963wWI2RXkb0PqnticxYaNio7hfK4licW/ifV9rJh9vbsBy1jdH4 yusY4BvNwm5RJ92mIjGjB8e9yQ1Jvsgdg60uBb8IYJpUppng9T8Mik338Y5g3hydyddiZ6lhVaw+4 2zI6IUPqoae/I/UHmU3pGI6I687R68DW7PJqlVa9OvfrmI+dgMypyIKjB5NQminHNp5ruZWLR/fWV 1tuo1ffu5Y+mS3JP/OfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6IYk-0000g6-A5; Mon, 24 Feb 2020 18:34:26 +0000 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6IYg-0000Sp-Mt for linux-snps-arc@lists.infradead.org; Mon, 24 Feb 2020 18:34:24 +0000 Received: from mailhost.synopsys.com (sv1-mailhost1.synopsys.com [10.205.2.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 5973EC04D7; Mon, 24 Feb 2020 18:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1582569261; bh=+DXCnfjaFK638fGlWaC+q6ownQXOxyuLJMqngqdt4bs=; h=From:To:Cc:Subject:Date:From; b=XHKeuGEpKfg9uey+iaxssV9uqhbiMOEX6Mdo9izMltEDiuXuKLIj3RzjYCWOF/cyQ iFRk4W9o2lBpzr6oyc8PGYhaPvZmjpKeMlRPAYKOAHX/el6vLOzzEM/csdfATOaOUp F4xwepc+IT7q4QGDHT+kzRzPF3x9XCtU+iw2N+GO9HXvVSGRLIEGGZmcjWoMr4ECty fKWleo9hWlSefpgqh0x5mQcM+SCtoydEgqxBZ/gIntVzQlP7+n2pXucrYhtgHEXbW6 LXlnR6scSa17xpOx869WF8dr8pFCOfSaeCg6Qw0iyUKzBKtO4Cn0/3c8A1sW39R9wT MhGTB6nBRK8uA== Received: from vineetg-Latitude-E7450.internal.synopsys.com (vineetg-latitude-e7450.internal.synopsys.com [10.10.161.26]) by mailhost.synopsys.com (Postfix) with ESMTP id A2A6BA005E; Mon, 24 Feb 2020 18:34:14 +0000 (UTC) From: Vineet Gupta To: libc-alpha@sourceware.org, arnd@arndb.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 Message-Id: <20200224183413.13629-1-vgupta@synopsys.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_103422_782464_66962D5C X-CRM114-Status: UNSURE ( 6.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, Vineet Gupta , linux-snps-arc@lists.infradead.org, lukma@denx.de Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This provides better out-of-box support for 32-bit arches with 64-bit time_t Signed-off-by: Vineet Gupta --- 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 @@ . */ #include +#include #include #include #include @@ -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