Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3680235pxu; Tue, 8 Dec 2020 19:56:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkaSN2X5hw8Kcsl5MNGYmK1/JG/XhnL6npWtzkwn6r2IvCtWty16Dt9/tZ3ocyi6tK0/ep X-Received: by 2002:a05:6402:17a3:: with SMTP id j3mr230488edy.333.1607486196898; Tue, 08 Dec 2020 19:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607486196; cv=none; d=google.com; s=arc-20160816; b=UzCodl/WtqTiBY1cAeJZ+uUg5KxvskYD9F9m768Vp78tlVcljJE1sHtIZMd6spbZBw YfQOO8EhZVeVFX65Ldvkm5KB3u132UGnXtt5m6e9xcHbTrnajiFpgTQzE76chFpRCJzH hm+DehojwERf8nhNbMSV6ToOG8wV/QF2dT13rPJYcX2XYdTQFwFM3Vt4Fqf9bd0TTaDp yn2H7JADvTL55KmZGJaSBSFOfwin5Za+ZwGlSVNI4gmWh9D9SVOfENSQ9ajEUC80B2k5 gGqJQ5iDy5511q0JxibGwoE6gMXL9etrHTbz8OzTBQdzslsRnd3hGHZ0qhrw8sE4huKr dGcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1l1vQ/mgTAOSKYtH7BCtqNUcovFMoZrn9mLPypc7ub8=; b=VlHi5cVrYaK76I44k7No51sp+lYaLA7xGJHJEZ7w4Fp72x0KJIUVlSkyhjRHTuzHEA CjgObCtzmjnadUZDYJOr5Qro1GrDvEniFfjVTMF/WcolWN6Cg2VWWQ6F27/eBtwlfhxt FDWOorWKzs0vW8glEOx4le7A54Uh9HcP/Y6LDQuQChOo/h81IgQi6QBBehBKGgYsqsrJ vquVXVg4uM3vXvsg8v6/vTHoUfDhFt+40CoJJboRpLGmGxf+/ZXCNhsgg1mfRBXOT1Tx 0OqYUYgEIBE6CxmwgLZ67eByc5HTQc+CkwjPpzmmEoiJmlGom2LucQzj668LB7k6yHoo YKhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf17si116644ejb.338.2020.12.08.19.56.14; Tue, 08 Dec 2020 19:56:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726119AbgLIDwi (ORCPT + 99 others); Tue, 8 Dec 2020 22:52:38 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57829 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgLIDwh (ORCPT ); Tue, 8 Dec 2020 22:52:37 -0500 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 8F320C0002; Wed, 9 Dec 2020 03:51:55 +0000 (UTC) Date: Wed, 9 Dec 2020 04:51:55 +0100 From: Alexandre Belloni To: Jason Gunthorpe Cc: Thomas Gleixner , LKML , Miroslav Lichvar , John Stultz , Prarit Bhargava , Alessandro Zummo , linux-rtc@vger.kernel.org, Peter Zijlstra Subject: Re: [patch 6/8] ntp, rtc: Move rtc_set_ntp_time() to ntp code Message-ID: <20201209035155.GA1245199@piout.net> References: <20201206214613.444124194@linutronix.de> <20201206220542.166871172@linutronix.de> <20201207205952.GL5487@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201207205952.GL5487@ziepe.ca> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/2020 16:59:52-0400, Jason Gunthorpe wrote: > On Sun, Dec 06, 2020 at 10:46:19PM +0100, Thomas Gleixner wrote: > > rtc_set_ntp_time() is not really RTC functionality as the code is just a > > user of RTC. Move it into the NTP code which allows further cleanups. > > > > Requested-by: Alexandre Belloni > > Signed-off-by: Thomas Gleixner > > --- > > drivers/rtc/Makefile | 1 > > drivers/rtc/systohc.c | 61 ---------------------------------- > > include/linux/rtc.h | 34 ------------------- > > kernel/time/ntp.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++-- > > 4 files changed, 85 insertions(+), 99 deletions(-) > > Fair enough, it is asymmetric with how HCTOSYS works, but not a big > deal > It is already asymmetric as hctosys will always happen as soon as the rtc driver is loaded but systohc will only actually be called only if ntp is enabled. I must admit I did consider moving it ou of the rtc subsystem instead of having it moved in class.c to solve the issue with rtc drivers compiled as modules but I still carry the nasty BITS_PER_LONG check to keep systemd happy on a 32bit userspace. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com