From patchwork Thu Feb 28 11:58:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10832841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F750139A for ; Thu, 28 Feb 2019 11:59:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A6B82E436 for ; Thu, 28 Feb 2019 11:59:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D8762E454; Thu, 28 Feb 2019 11:59:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DD91E2E436 for ; Thu, 28 Feb 2019 11:59:27 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=YJl2dPgFsfnXcw+Ze5j7ldtbR2mfuD+StolelEc8B/I=; b=XNCNJAaoDrK3LR IqqG9lNYIDcglW3gAWXp8P5qQ1G+vF7V16jsMt/cd9s8bAuRYQy/TawpZQHowe3jB12++BLHIoyd7 uHvbS6cSOI2HVM1cp7i9yiI3dAF4dlNzbxVRcq5BXP6SHIgipZng8zzvK4WdME0fmMa4XCLDAwhg2 LR1ynqSW9yGDfb66GBYbo4HydwNgWyPqWF945vJuQC9ops56erW6Htl0PMp9ioZE19WTS8u1el/sz uivNEbd80aNLFwXJtDOwFeCGWCTOp8tEkJndOMQwO9oGnXy22AUYO7O7mqprejGpH5EfPsMHPcnE0 OQtRkkWw5i8PVvQQINTw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzKLT-00087A-UC; Thu, 28 Feb 2019 11:59:23 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzKLR-00086d-Ak for linux-arm-kernel@lists.infradead.org; Thu, 28 Feb 2019 11:59:23 +0000 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1M42X0-1gzKLC2pgO-00056B; Thu, 28 Feb 2019 12:59:06 +0100 From: Arnd Bergmann To: Vincenzo Frascino Subject: [PATCH 2/2] vdso: add clock_gettime64 Date: Thu, 28 Feb 2019 12:58:55 +0100 Message-Id: <20190228115855.610027-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190228115855.610027-1-arnd@arndb.de> References: <20190228115855.610027-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:SODFCYswHdUPOd4RbT8zmOnLgULPc2Qu7XHVUJWnotjvQjFSjpn asssOkx4NpKIKUG9PPKzzV3kVwiTMOsh4T56ABH8hr7jPxphUw5k2FdkIs8hrM0GurZWWn8 2I/NL1MVDAiUYYJAwIRfkLLi0heLyBDBWqKlYU9OPbWKpSkrTYZV7nhJZmLlAC177qIGZeh UMFR8tlKJSgxg3wZidWHA== X-UI-Out-Filterresults: notjunk:1;V03:K0:CE7etOE00ck=:SiX7yXLB666aXjRAFEQqDB QVrOv4HRuktfkqz/nT13hNcRoTfRUKsnjJjVWcqFWuPH8PrqNTyO7sBMqn3gjxqQE2iAgCSmD W80TGugwPEJH2Z4vFvDuu5mLIWnWVxCjIGCHwR3pAn8bcxmCNaIIjtqpHR5GRtqJAZIRTUELJ fzl20JlROprqcf2fEdCPKa+J1axymngwR21VPlCZFJmg0LGQayvIc8ihnUC0KcznP3WFjmYmV dfvQHArh+HtOD4HOeR0IawAi/9fIbfnMdjZKxEugs5sBDBhpErExp3f5TVPlTLPtl7uw/rY6X zjXxEPziTjWL7TZLFX2rVlNpac2rjU+ncU/RdJ2NHvPZ+9TQdHuRwr+V2od1LXAynCz8oHoaN 1/wKqNsY+1apjW/w4q+0lMe7imXo6aufPfJL/bDmc2zJFuhyjB9s7wuPyV9Mt2j5eQc7y+l7R efUdnhnFWMIpKD+nHFgqeA14YPhLawT3O4wLuOH1MwHH/eMIW1yZ3DrNVh/nnJrrG7ywMPPMZ 2zIzySP+QyZQ1kfe9QVSTB/mWl8na9WyNE0Yd1890JANnit4f9dlba+sWcigEAEZcfNuYj6rf 3YQQG6C7naxElCuj75h+i5MnRiDPoBpva1GaD6iwvboJuwd33wBX59zhYlbGOQPxSE+8llLqk B97wNJQlsVHLdPXpL1zbbPmp4AdfdyjEuBWKYEiPCQYiQaBHdIkC01Rx2UPT8FpgT/ehe0ueW MP6GxQ6YZddQIMx3cpJd2Z7s4VI9EhUeVCezWw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190228_035921_672934_6C89864C X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Shuah Khan , Arnd Bergmann , Catalin Marinas , Daniel Lezcano , Will Deacon , Russell King , Ralf Baechle , Mark Salyzyn , Paul Burton , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes , Thomas Gleixner , Peter Collingbourne , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Adding a clock_gettime64() vdso call on all32-bit machines is now trivial. Signed-off-by: Arnd Bergmann --- arch/arm/vdso/vdso.lds.S | 1 + arch/arm/vdso/vgettimeofday.c | 6 ++++++ arch/arm64/kernel/vdso32/vdso.lds.S | 1 + arch/mips/vdso/vdso.lds.S | 3 +++ arch/mips/vdso/vgettimeofday.c | 6 ++++++ arch/x86/entry/vdso/vclock_gettime.c | 6 ++++++ arch/x86/entry/vdso/vdso32/vdso32.lds.S | 1 + 7 files changed, 24 insertions(+) diff --git a/arch/arm/vdso/vdso.lds.S b/arch/arm/vdso/vdso.lds.S index 1d81e8c3acf6..05581140fd12 100644 --- a/arch/arm/vdso/vdso.lds.S +++ b/arch/arm/vdso/vdso.lds.S @@ -83,6 +83,7 @@ VERSION __vdso_clock_gettime; __vdso_gettimeofday; __vdso_clock_getres; + __vdso_clock_gettime64; local: *; }; } diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index b4607a5ecf31..6762f800a8ea 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -14,6 +14,12 @@ notrace int __vdso_clock_gettime(clockid_t clock, return __cvdso_clock_gettime32(clock, ts); } +notrace int __vdso_clock_gettime64(clockid_t clock, + struct __kernel_timespec *ts) +{ + return __cvdso_clock_gettime(clock, ts); +} + notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) { diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S index 4fd3093ea78c..a3944927eaeb 100644 --- a/arch/arm64/kernel/vdso32/vdso.lds.S +++ b/arch/arm64/kernel/vdso32/vdso.lds.S @@ -68,6 +68,7 @@ VERSION __kernel_sigreturn_thumb; __kernel_rt_sigreturn_arm; __kernel_rt_sigreturn_thumb; + __vdso_clock_gettime64; local: *; }; } diff --git a/arch/mips/vdso/vdso.lds.S b/arch/mips/vdso/vdso.lds.S index 90b2c2785e32..659fe0c3750a 100644 --- a/arch/mips/vdso/vdso.lds.S +++ b/arch/mips/vdso/vdso.lds.S @@ -100,6 +100,9 @@ VERSION __vdso_clock_gettime; __vdso_gettimeofday; __vdso_clock_getres; +#if _MIPS_SIM != _MIPS_SIM_ABI64 + __vdso_clock_gettime64; +#endif #endif local: *; }; diff --git a/arch/mips/vdso/vgettimeofday.c b/arch/mips/vdso/vgettimeofday.c index 7a3320faa29a..0b4fea088f89 100644 --- a/arch/mips/vdso/vgettimeofday.c +++ b/arch/mips/vdso/vgettimeofday.c @@ -27,6 +27,12 @@ notrace int __vdso_clock_getres(clockid_t clock_id, return __cvdso_clock_getres_time32(clock_id, res); } +notrace int __vdso_clock_gettime_time64(clockid_t clock, + struct __kernel_timespec *ts) +{ + return __cvdso_clock_gettime(clock, ts); +} + #else notrace int __vdso_clock_gettime(clockid_t clock, diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index c9512c114ac1..0a7d4bdeadc9 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -54,6 +54,7 @@ int clock_getres(clockid_t, struct __kernel_timespec *) #else /* i386 only */ extern int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts); +extern int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts); extern int __vdso_clock_getres(clockid_t clock, struct old_timespec32 *res); notrace int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts) @@ -64,6 +65,11 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts) int clock_gettime(clockid_t, struct old_timespec32 *) __attribute__((weak, alias("__vdso_clock_gettime"))); +notrace int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts) +{ + return __cvdso_clock_gettime(clock, ts); +} + notrace int __vdso_clock_getres(clockid_t clock, struct old_timespec32 *res) { diff --git a/arch/x86/entry/vdso/vdso32/vdso32.lds.S b/arch/x86/entry/vdso/vdso32/vdso32.lds.S index 991b26cc855b..c7720995ab1a 100644 --- a/arch/x86/entry/vdso/vdso32/vdso32.lds.S +++ b/arch/x86/entry/vdso/vdso32/vdso32.lds.S @@ -27,6 +27,7 @@ VERSION __vdso_gettimeofday; __vdso_time; __vdso_clock_getres; + __vdso_clock_gettime64; }; LINUX_2.5 {