Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2623416pxb; Sun, 17 Oct 2021 20:48:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoPMiYK8Oi2I8YN3NOVKiEtbJ5wpyc/LjbJaFiGWmHHxdrT4WJzNgODLPKN3XB1cxyxhvU X-Received: by 2002:a63:7447:: with SMTP id e7mr21539593pgn.261.1634528917366; Sun, 17 Oct 2021 20:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528917; cv=none; d=google.com; s=arc-20160816; b=Vbhsa8Xn6KE9whN8ZqQXmLfQUlE4RZ8HLi4gP9RC8PMS+mWHAM424BCyKqdJdQK973 CYCXyFpIRzbWlsbhqbFtR2v96DOh+Fyigt0fQXPEUbUewLzQrkdrfyt33dCzN2tRQ1nS GDkvoCoU42uRcsBOPDKnpoxAu5s88USdiNoJ/jMwHHUWAtiZFKCX5jYD3xFmL4bo5Jzx yLVtH2A+0jmXlvWx0iiW9fFgYyKXbxeKj7BLcBOBnk2IyVDzycayht+DnVyTILA/S1x5 kD2L2z3j8LGveE+60DHzHEPc5JC1nRUFd7VMDUf5rAFDjr/PxfdLKdQZu89eimSDoErA 5SLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=++yLTnPRj4tvCVqJQRXnOoA9w6viZBnPxa1M6V+Fvh0=; b=DYlK8LGOo1mA5A8XMTEMoU48oum2ljTUXHEo3TEj69kMdZSf68TEoSK0d+paztYQXZ g/49OuUoYBBJECJYQXA39ccNgv7xODXLKWgFwPNoHJLF9Em2INf+Nvk9xRv+whYm2b1g 1V5B/G2RdvLrthu0ITlT6tQZbFoPoNZ7X8N63TNYsLU1dTmzurorZTfez7MAkSWdVzGc SMD5N4xmAnUYQeLLkjmkONJllTDJ5fyHo+Q/bEw5XIV3k9ljZhljxrIIzlHJK9ecselN DtbVHIeCwBgztUun4G0apyuDt/4PnITTSYxV9u6yqkJHYN/MU39pnYNNVmJYRbCU6/m3 zX+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=pQo8RgLl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=o2.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si24244715plg.171.2021.10.17.20.48.24; Sun, 17 Oct 2021 20:48:37 -0700 (PDT) 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; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=pQo8RgLl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=o2.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344593AbhJQTm0 (ORCPT + 98 others); Sun, 17 Oct 2021 15:42:26 -0400 Received: from mx-out.tlen.pl ([193.222.135.142]:40258 "EHLO mx-out.tlen.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344581AbhJQTm0 (ORCPT ); Sun, 17 Oct 2021 15:42:26 -0400 Received: (wp-smtpd smtp.tlen.pl 27105 invoked from network); 17 Oct 2021 21:40:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1634499614; bh=++yLTnPRj4tvCVqJQRXnOoA9w6viZBnPxa1M6V+Fvh0=; h=From:To:Cc:Subject; b=pQo8RgLl6x1CNdnLjPQOHjOAKDfW4LCfubk6pXaGsngHQZGMv7nrc5Okm3sHoneDn H4ymBvRxf14kK/qGzT/7g5hm82RueyJ41CILMUqU5kcJQ8A3JNxNbhuxupyvwS+eTz Q8on9f91F8v8BGQ9pCzeEVrTx3nEnP7OeDLa5kBw= Received: from aaet142.neoplus.adsl.tpnet.pl (HELO localhost.localdomain) (mat.jonczyk@o2.pl@[83.4.123.142]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with SMTP for ; 17 Oct 2021 21:40:14 +0200 From: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= To: linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Cc: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH RESEND 6/6] x86/rtc: rename mach_set_rtc_mmss Date: Sun, 17 Oct 2021 21:39:27 +0200 Message-Id: <20211017193927.277409-7-mat.jonczyk@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211017193927.277409-1-mat.jonczyk@o2.pl> References: <20211017193927.277409-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-WP-MailID: 9d0eece35a2c61499ea8c76439e4131d X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [IbOk] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Once upon a time, before commit 3195ef59cb42 ("x86: Do full rtc synchronization with ntp") in 2013, the function set only the minute and seconds registers of the CMOS RTC. This is no longer true, so rename the function to mach_set_cmos_time. Signed-off-by: Mateusz Jończyk Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" --- arch/x86/include/asm/mc146818rtc.h | 2 +- arch/x86/kernel/rtc.c | 4 ++-- arch/x86/kernel/x86_init.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/mc146818rtc.h b/arch/x86/include/asm/mc146818rtc.h index 97198001e567..6115bb3d5795 100644 --- a/arch/x86/include/asm/mc146818rtc.h +++ b/arch/x86/include/asm/mc146818rtc.h @@ -95,7 +95,7 @@ static inline unsigned char current_lock_cmos_reg(void) unsigned char rtc_cmos_read(unsigned char addr); void rtc_cmos_write(unsigned char val, unsigned char addr); -extern int mach_set_rtc_mmss(const struct timespec64 *now); +extern int mach_set_cmos_time(const struct timespec64 *now); extern void mach_get_cmos_time(struct timespec64 *now); #define RTC_IRQ 8 diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index bd170362edef..17aa575a2c38 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -30,13 +30,13 @@ DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL(rtc_lock); /* - * In order to set the CMOS clock precisely, set_rtc_mmss has to be + * In order to set the CMOS clock precisely, mach_set_cmos_time has to be * called 500 ms after the second nowtime has started, because when * nowtime is written into the registers of the CMOS clock, it will * jump to the next second precisely 500 ms later. Check the Motorola * MC146818A or Dallas DS12887 data sheet for details. */ -int mach_set_rtc_mmss(const struct timespec64 *now) +int mach_set_cmos_time(const struct timespec64 *now) { unsigned long long nowtime = now->tv_sec; struct rtc_time tm; diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 8b395821cb8d..8b597c39cf3a 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -133,7 +133,7 @@ struct x86_platform_ops x86_platform __ro_after_init = { .calibrate_cpu = native_calibrate_cpu_early, .calibrate_tsc = native_calibrate_tsc, .get_wallclock = mach_get_cmos_time, - .set_wallclock = mach_set_rtc_mmss, + .set_wallclock = mach_set_cmos_time, .iommu_shutdown = iommu_shutdown_noop, .is_untracked_pat_range = is_ISA_range, .nmi_init = default_nmi_init, -- 2.25.1