Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp163695imm; Fri, 5 Oct 2018 01:29:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV61l6QCBq4JNsVdrwLW6lH4otc9RIhnL1KmgrfivQBg0jDfK8MAdHJ8k0mVZTYailMeOwgpa X-Received: by 2002:a17:902:780f:: with SMTP id p15-v6mr10206347pll.170.1538728173364; Fri, 05 Oct 2018 01:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538728173; cv=none; d=google.com; s=arc-20160816; b=ebzQFVBmbtZtKpwOEn3wg0h/RFCY/hBeW8lG0U1fh6QjDxPPqvazAbL1BNWIKsNOi1 xqdixf6qmzEKZA/Ktuq7/683w1oGP7HSGL0AhUFQmbGVwtqrN8ZXb6Vb2epP0c7pGhTp MFo65hacaG/hRHh2o5FEzrFagETjpcMWDHzjGvzSvggMXseC9g+ZhEezASDXKN7cEQGy 1HmES+m/NMjc8c0Ji1Oq3OM+gjAkhm1r9bqsL2U4t6dRcbRy3T91PtiNuHAg07SHmQkE ncs5Ff/3yEMcBS8vJ2dF8A7rWZspMyI1mSAZDQfmGCvV/PcoNdXHRal0NxY9FFfh7H+A PTRA== 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=gkByoMP6RDCh0N4FflUCRjHf1EpRBRGYf3Imtj5V1kg=; b=ipvGXHrph1CRnFLo418G/XrGuHGQouzNBtDDQXhsLm24HDJqvlJszUiR4It7ajvH06 TURgMTtXidU8uxjM5SmNwZDe2pID182dFe/WyaSQYOSGd9ctDXeRjBxkT4P/FsZ8ig3Q dkxxp2qq/ihNDnTtTCCXrr17URtSGV0adN6tmuXLtmMKdoUK04UipYNRYm6qSwXpAwun QXu3bcnYBz6YFp/BUIWVNmptzJG8oocLHWb2CwJ1M46xL4B5P1trHLWa6lkv47AtdGCH M8aHaz5O/YKrpYMbnP6a1sG9bqfXknfcfdS9ip1IwftBizCSW8Ps++5r7ySEO8LL371a EkKA== 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 r8-v6si8163711pfh.229.2018.10.05.01.29.17; Fri, 05 Oct 2018 01:29:33 -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 S1728479AbeJEP0c (ORCPT + 99 others); Fri, 5 Oct 2018 11:26:32 -0400 Received: from terminus.zytor.com ([198.137.202.136]:35171 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728389AbeJEP0b (ORCPT ); Fri, 5 Oct 2018 11:26:31 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w958SYT93071711 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Oct 2018 01:28:34 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w958SXo33071707; Fri, 5 Oct 2018 01:28:33 -0700 Date: Fri, 5 Oct 2018 01:28:33 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Andy Lutomirski Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, luto@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, hpa@zytor.com Reply-To: peterz@infradead.org, hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, luto@kernel.org, tglx@linutronix.de, mingo@kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/vdso] x86/vdso: Document vgtod_ts better Git-Commit-ID: bcc4a62a73cb65327d7268fbfa3a786d603f52dc 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, T_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: bcc4a62a73cb65327d7268fbfa3a786d603f52dc Gitweb: https://git.kernel.org/tip/bcc4a62a73cb65327d7268fbfa3a786d603f52dc Author: Andy Lutomirski AuthorDate: Thu, 4 Oct 2018 14:44:45 -0700 Committer: Ingo Molnar CommitDate: Fri, 5 Oct 2018 10:12:18 +0200 x86/vdso: Document vgtod_ts better After reading do_hres() and do_course() and scratching my head a bit, I figured out why the arithmetic is strange. Document it. Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/f66f53d81150bbad47d7b282c9207a71a3ce1c16.1538689401.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/include/asm/vgtod.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index d17b092b9f1b..69d05c6d47f5 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h @@ -13,6 +13,15 @@ typedef u64 gtod_long_t; typedef unsigned long gtod_long_t; #endif +/* + * There is one of these objects in the vvar page for each + * vDSO-accelerated clockid. For high-resolution clocks, this encodes + * the time corresponding to vsyscall_gtod_data.cycle_last. For coarse + * clocks, this encodes the actual time. + * + * To confuse the reader, for high-resolution clocks, nsec is left-shifted + * by vsyscall_gtod_data.shift. + */ struct vgtod_ts { u64 sec; u64 nsec;