Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp139236iob; Tue, 17 May 2022 21:34:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBjYKLpYGgGFXIpEqbumm1CzsDtLbDYUk+7l9wNLP3RLYjR6lZgXuvBK2SZ8ny/kYbh61U X-Received: by 2002:a05:6a02:106:b0:36c:96dd:8c17 with SMTP id bg6-20020a056a02010600b0036c96dd8c17mr22627119pgb.190.1652848446815; Tue, 17 May 2022 21:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652848446; cv=none; d=google.com; s=arc-20160816; b=tbBkUtkGYWCvoZtHC5QTT3Eek21c55GTWk6mEDu/aSvmpdy3nbskA/gPGe8Bwa5EI6 +1BnFBkifO9Zu2UnO926gZD2rOkomIxs1LBz5JX2WsgU2HbrvW2tW58EWYdcFvYwaxEN DGDYByM0Pq02oncypSFivM2QWCDSf7kFxIIUjjf0IyHtjcws1m7B00zkuzXNJhwh9dBP dQwK7KXMkkW8p27vNe+IIqYWy/rT8Ko5FVSHF+C0jyTGuSqR/J7ry4VNqV9Zvi9qw0kp syXXKjKC5hHcw0cCJ3z5LAcRidbKcEVzh2sqin+iSon/JAHImGBpEodibVUKxfGtbO9h XBmA== 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=KT7q9eMAxby7uyk2jYuKh3OvBVpIpHr8zoPO+QpVv2U=; b=DE3D015KKPzsNBSQtUSRp+2kT2f5cUk5AlTagCq0lK8Xaj0M6ACK3HkeYZg3hnyzyt i3t5CkfTNinZ05WmMd1EOCQb7kzmEzrBdZkYnrK/lvsQ/m3igVMiKiCtgHedX+GGgms6 EC73jqMpD9Ahm61VdeztJZKaWQ94cn6Jy7Uvyjm2nRaGpro9fUFWxzcyBz29eYIJl/SP DJRYnX+jNSzt8MjqYZOH9rIJN8s5V3jfZ4g+QuGKKpA7Ezp9dLmMf32tZihdeb3fsQBX 7yNnONvQ2BKYbzCpDJGVm+KVmqaqZEe8fPea5TwFJSep69vcv0ARMO/x4XPWMT6yo1S6 oj2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=MqFcUpGC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r21-20020a63fc55000000b003db60740a25si1234801pgk.35.2022.05.17.21.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:34:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=MqFcUpGC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=o2.pl Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3422F87238; Tue, 17 May 2022 20:52:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346834AbiEQUWZ (ORCPT + 99 others); Tue, 17 May 2022 16:22:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352903AbiEQUWJ (ORCPT ); Tue, 17 May 2022 16:22:09 -0400 Received: from mx-out.tlen.pl (mx-out.tlen.pl [193.222.135.148]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A72151E6E for ; Tue, 17 May 2022 13:22:07 -0700 (PDT) Received: (wp-smtpd smtp.tlen.pl 26781 invoked from network); 17 May 2022 22:22:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1652818924; bh=KT7q9eMAxby7uyk2jYuKh3OvBVpIpHr8zoPO+QpVv2U=; h=From:To:Cc:Subject; b=MqFcUpGC1tSz4iKrU9o7A43ozQ6I+O5TYeYaJ7wCk6ChPs6yzJL7KNquqCSNB1DXQ dq56mIf9YpUFl6DZArNhO4x5rejzK9xqo/Jg+SlLRWYVmAKDO4ScqFYlp3V01cyN+y Kh3SvKjTzgeyU6TpHsLZzdbhZgYInE+1cUxHqAao= Received: from aafg236.neoplus.adsl.tpnet.pl (HELO localhost.localdomain) (mat.jonczyk@o2.pl@[83.4.136.236]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with SMTP for ; 17 May 2022 22:22:04 +0200 From: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH v2 resend 2/2] x86/rtc: rename mach_set_rtc_mmss Date: Tue, 17 May 2022 22:21:31 +0200 Message-Id: <20220517202131.379939-3-mat.jonczyk@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220517202131.379939-1-mat.jonczyk@o2.pl> References: <20220517202131.379939-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-WP-MailID: 5861db3696100fcc0889870520856aca X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [USOE] X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: Dave Hansen 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 1cadc8a15267..349046434513 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -27,13 +27,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 e84ee5cdbd8c..57353519bc11 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -138,7 +138,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