Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1466039imm; Thu, 4 Oct 2018 14:12:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FkUS+dkFUWJ25Oax+MdNME7HXpdYhwYNpwq7qyCLHsNnnhPd161VpPLCSw6WnLm//cZCB X-Received: by 2002:a62:5887:: with SMTP id m129-v6mr3872415pfb.254.1538687525321; Thu, 04 Oct 2018 14:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538687525; cv=none; d=google.com; s=arc-20160816; b=HipdD7Eznsl/AD7YL+XeFL+MtiaO3bmlfJaBkSW3v2QCFAEH2DghWi7FgmJUuwEVAZ BWBIwyuk6taKmTliegc7mG9f3d8bToi/ybAtzieV45b8xA3y25Mn2KatCrm+v9ozXGL/ XKzkG5bGJVFkIxDg8r7EkEWduJSl/C440Q4y9JTJ4jKQnpRw7QjM8Y+of9BFcT/ywkfd zNo8Q+eXpL2qWdPhtws7dXQOkG4RvjnXM0mwCbOtIgnp/g9qJ5fe/s6nxMdAV6Q6juc9 Y/tEClx32xNIkB+barx5OKeOLRjHbukpGDPOnOBommc+ne6dXdD8npoJFnCddNoct+j6 S9MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=Y1DeTppgMNPANHJNSgYKE6iBsfiyJrwkPsisa6wjTbQ=; b=xD8SocT6rzec3aQ/MblDgcpAL6u46/awIG48tATCFc+h9Obk0SPUjI0RkAVRIeqphv MbxXKTiS+MVEC8Y0yon6FQRXh4aOPPnxpg4kqgPLArUDqRtug1MWC8ydd9QXQs/cVnLA Unjhj6jfZRu6hWoH0qTCpEmOR1nATls+MRrhWHnBsmTn0D8SsHQRq7ZNrpKlRg8zt2WA w3lc7UWiL+xa0XUkOVKtn2aPK1UTfcya5CmrUL8wGQPHMNQyKKGRNZyHFQHbTyBN05/a o/ir8mI/A+3dYEgEL5qHzlDiZS+xuA5AVSdTvFA1LElX+5LBmepVf9ZApg6OtHMvFBsj AlLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10-v6si6076194plp.128.2018.10.04.14.11.47; Thu, 04 Oct 2018 14:12:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727302AbeJEEF1 (ORCPT + 99 others); Fri, 5 Oct 2018 00:05:27 -0400 Received: from terminus.zytor.com ([198.137.202.136]:40087 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725758AbeJEEF0 (ORCPT ); Fri, 5 Oct 2018 00:05:26 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w94L9aJ62885362 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Oct 2018 14:09:36 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w94L9aIO2885359; Thu, 4 Oct 2018 14:09:36 -0700 Date: Thu, 4 Oct 2018 14:09:36 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Thomas Gleixner Message-ID: Cc: vkuznets@redhat.com, pbonzini@redhat.com, matt@softrans.com.au, arnd@arndb.de, linux-kernel@vger.kernel.org, john.stultz@linaro.org, luto@kernel.org, mingo@kernel.org, sboyd@kernel.org, tglx@linutronix.de, kys@microsoft.com, peterz@infradead.org, jgross@suse.com, fweimer@redhat.com, hpa@zytor.com Reply-To: vkuznets@redhat.com, pbonzini@redhat.com, matt@softrans.com.au, linux-kernel@vger.kernel.org, arnd@arndb.de, john.stultz@linaro.org, luto@kernel.org, mingo@kernel.org, sboyd@kernel.org, tglx@linutronix.de, kys@microsoft.com, peterz@infradead.org, jgross@suse.com, fweimer@redhat.com, hpa@zytor.com In-Reply-To: <20180917130707.823878601@linutronix.de> References: <20180917130707.823878601@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/vdso] x66/vdso: Add CLOCK_TAI support Git-Commit-ID: 315f28fa3a7bfbbb6233d800dffa327e87f96129 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 315f28fa3a7bfbbb6233d800dffa327e87f96129 Gitweb: https://git.kernel.org/tip/315f28fa3a7bfbbb6233d800dffa327e87f96129 Author: Thomas Gleixner AuthorDate: Mon, 17 Sep 2018 14:45:44 +0200 Committer: Thomas Gleixner CommitDate: Thu, 4 Oct 2018 23:00:27 +0200 x66/vdso: Add CLOCK_TAI support With the storage array in place it's now trivial to support CLOCK_TAI in the vdso. Extend the base time storage array and add the update code. Signed-off-by: Thomas Gleixner Tested-by: Matt Rickard Acked-by: Andy Lutomirski Cc: Peter Zijlstra Cc: Stephen Boyd Cc: John Stultz Cc: Florian Weimer Cc: "K. Y. Srinivasan" Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: Paolo Bonzini Cc: Arnd Bergmann Cc: Juergen Gross Link: https://lkml.kernel.org/r/20180917130707.823878601@linutronix.de --- arch/x86/entry/vsyscall/vsyscall_gtod.c | 4 ++++ arch/x86/include/asm/vgtod.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/vsyscall/vsyscall_gtod.c b/arch/x86/entry/vsyscall/vsyscall_gtod.c index 31b9e5e0cfdf..cfcdba082feb 100644 --- a/arch/x86/entry/vsyscall/vsyscall_gtod.c +++ b/arch/x86/entry/vsyscall/vsyscall_gtod.c @@ -51,6 +51,10 @@ void update_vsyscall(struct timekeeper *tk) base->sec = tk->xtime_sec; base->nsec = tk->tkr_mono.xtime_nsec; + base = &vdata->basetime[CLOCK_TAI]; + base->sec = tk->xtime_sec + (s64)tk->tai_offset; + base->nsec = tk->tkr_mono.xtime_nsec; + base = &vdata->basetime[CLOCK_MONOTONIC]; base->sec = tk->xtime_sec + tk->wall_to_monotonic.tv_sec; nsec = tk->tkr_mono.xtime_nsec; diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index 10e534a1a51a..d17b092b9f1b 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h @@ -18,8 +18,8 @@ struct vgtod_ts { u64 nsec; }; -#define VGTOD_BASES (CLOCK_MONOTONIC_COARSE + 1) -#define VGTOD_HRES (BIT(CLOCK_REALTIME) | BIT(CLOCK_MONOTONIC)) +#define VGTOD_BASES (CLOCK_TAI + 1) +#define VGTOD_HRES (BIT(CLOCK_REALTIME) | BIT(CLOCK_MONOTONIC) | BIT(CLOCK_TAI)) #define VGTOD_COARSE (BIT(CLOCK_REALTIME_COARSE) | BIT(CLOCK_MONOTONIC_COARSE)) /*