From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDE6FC433FE for ; Mon, 7 Dec 2020 21:06:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8290E2388C for ; Mon, 7 Dec 2020 21:06:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbgLGVFs (ORCPT ); Mon, 7 Dec 2020 16:05:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbgLGVFs (ORCPT ); Mon, 7 Dec 2020 16:05:48 -0500 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3A1AC061793 for ; Mon, 7 Dec 2020 13:05:07 -0800 (PST) Received: by mail-qt1-x834.google.com with SMTP id y15so2936656qtv.5 for ; Mon, 07 Dec 2020 13:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nKAI0S93ME7i51hseZ6+wmpHBdg0HI9aWCiEZunfjik=; b=Soxx/3N87PGx3mb5h4nU9Y/1F8HFpxwJU3/MJ0CuDY+YN8OP9ACnbLtyxJ8Tb1X8IU iQYU8f8pjcrD6PDHJKHkthDsupHcCsffWRG14SORf3yzaND07VUUJCr8elCDRf+RQh3K FIei72MzqrbuDO0n+BkP/5R2H64pPI3IwWV9r0/XFeEIkJwupKsKnrxBVgedybjx92vk ROyk2ju1mOewZF/mB/98rKMHu2KDDNnD4PbvV4RZQTfTopE/Jf7GEDq0l8ii8wFssBR7 XfSXbdl1azrnUgwDW4U43iXyGjoeYbnD7ymnTH4Oo27RxG0DE0MO1nWLfQdtpTSeCn/J x5nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nKAI0S93ME7i51hseZ6+wmpHBdg0HI9aWCiEZunfjik=; b=QD5Uubg/SDaGSOXQ//UQL+L2OWhaODXbPVZhCXz7yoEob9jNvAg/A4lJRQs9Oh4Pc8 ZsWXoDs1F8HwR4OqI8CNrTX7h9iARwGI2YJLO1d88me5BO5K4bc0ljX44FTcKTJ6Bh3b IVuz3HTwcC3VpeGVKO/PJVSiUMs8zQgNbRfyRxEXNUhjT67fZzwGslllydQzMFKlrZA3 IDT/JFLnu3zQ3ED8fBTs3ps6AqTxWSNn2gEitmEchnpIBwhaNYgX3hJjEbWdQuesynMT bJ9jszcRMyWTxaavykBj/1ZdU1EFfEnZ02UA5Lfup0tnWXK4Fy8ZfGFDcSYDXKbmli2J UmlQ== X-Gm-Message-State: AOAM532KvYYN/w1pMJDUdWoFqHMHtsiSRSxOUgXevV98YyU/Cq12PVlb UMP/OVVsiFVO/Dv/2bdxesw4Xg== X-Google-Smtp-Source: ABdhPJxj04RcFkKycBCmmM8xlj5X137EFzrpVhlQXfFhcfVDinY9DvcLduWOoOwwCNTtmiIK5wSaAw== X-Received: by 2002:ac8:5450:: with SMTP id d16mr25669307qtq.33.1607375107115; Mon, 07 Dec 2020 13:05:07 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id h16sm13760997qko.135.2020.12.07.13.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 13:05:06 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kmNgv-007fdg-Qh; Mon, 07 Dec 2020 17:05:05 -0400 Date: Mon, 7 Dec 2020 17:05:05 -0400 From: Jason Gunthorpe To: Thomas Gleixner Cc: LKML , Alexandre Belloni , Miroslav Lichvar , John Stultz , Prarit Bhargava , Alessandro Zummo , linux-rtc@vger.kernel.org, Peter Zijlstra Subject: Re: [patch 8/8] ntp: Consolidate the RTC update implementation Message-ID: <20201207210505.GM5487@ziepe.ca> References: <20201206214613.444124194@linutronix.de> <20201206220542.355743355@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201206220542.355743355@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 06, 2020 at 10:46:21PM +0100, Thomas Gleixner wrote: > /* > * If we have an externally synchronized Linux clock, then update RTC clock > * accordingly every ~11 minutes. Generally RTCs can only store second > @@ -686,6 +621,10 @@ static bool sync_cmos_clock(void) > */ > static void sync_hw_clock(struct work_struct *work) > { > + static unsigned long offset_nsec = NSEC_PER_SEC / 2; A comment here explaining this is the default: because the platform is assumed to use CMOS, and by the way, this whole thing is obsolete don't use it, seems appropriate.. The time split is clearer if you think of it from a bus/datasheet perspective, less clear if you try to measure the system directly, eg from an alarm. But, I think this has a better chance of some rtclib driver authors to fill in the datasheet value at least. Reviewed-by: Jason Gunthorpe Jason