Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp893682pxb; Fri, 22 Apr 2022 13:38:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyz9dQqYyFqjLDu93F2ipfzCYp0goj5XJv668UNhCAwQWtylz5rAieYlJQyqrbkn2/C015W X-Received: by 2002:aa7:983c:0:b0:50c:efb1:6861 with SMTP id q28-20020aa7983c000000b0050cefb16861mr4174835pfl.24.1650659887387; Fri, 22 Apr 2022 13:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650659887; cv=none; d=google.com; s=arc-20160816; b=REDWWx1L6A9l3oj6cVegcdBrJMbHKJ6kPSbOxgw4MFQfyVchwz1WUmAEUdxvweNAPV cZEWH/tLE57gIlwdLXfGTUMXYQRelzK5mDfIcmtyXHIscWI7CBiLQtKTNAWNRFV/tl12 Vi4rOsw3OtMSD6TEK4cEzd2K+lWZWqCo4dymb0kOa+unPkMeNRKgMMQ7qSpL82JoWeqs a7AjewJ7m7Qa/9Cy425vakkzLKU9dbkZXCwaCBq8SWvfCofU+WSOYZDyFGUMv/ybQaYb G4H1MD9muCkkva2LoJNkp9H3CgpLuyNiKLaPebeOOi3tIA358QbFhZsIdLEX9bybtYfk 4pcQ== 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=NsWHZSW0dFSsS2KTUXB4l/R/epJXoZUKZ0hgygE6rGoxBoa+a+xElg0t8p4uNbABHE pZMNLOrjZ1ewADbN9NOFLuKWAktqVLmeyJ/i2R3spag1KhQ58gZbegxXKxw2aNjzzXpm 9YVq5p0YkP3a7LEa4zHV8Yn4YlhpeEjws2UtWZmeAB5mVmU6hALuR+9ucLuCgDTG04Kh uBZZEFBrF2Tg6kVYdpPvGsf0Lz/NbkZBDqxSnGw8+5u6oW3NzqqNtZaZs+tWmLtcQhmK 3VpKFH5p2XWAYkYx/LtQyQ7ZHtMP0CZpkWsGAECp9bO9Ut0z2LbWVBXQjzXDRNrVchaz /cuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=DhQE9adG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o3-20020a17090a5b0300b001cb7565298csi8189298pji.76.2022.04.22.13.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:38:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=DhQE9adG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4BB721BFCB4; Fri, 22 Apr 2022 12:23:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391803AbiDUT2i (ORCPT + 99 others); Thu, 21 Apr 2022 15:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390623AbiDUT2b (ORCPT ); Thu, 21 Apr 2022 15:28:31 -0400 Received: from mx-out.tlen.pl (mx-out.tlen.pl [193.222.135.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D10134551E for ; Thu, 21 Apr 2022 12:25:40 -0700 (PDT) Received: (wp-smtpd smtp.tlen.pl 24171 invoked from network); 21 Apr 2022 21:25:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1650569136; bh=KT7q9eMAxby7uyk2jYuKh3OvBVpIpHr8zoPO+QpVv2U=; h=From:To:Cc:Subject; b=DhQE9adGRhpowyJEBc9mhoEvr4wrXxXbN2WV2wNOydYIOjma8KF3+cSjZ1vlgEvSi rf1tJQPKjy0eYkwprTwhvs2DP/aWzKdj4hBmZtfLPayZhEzmEuvRSSwAEOjz3q7EDZ oEIGBNCv6gJipvDvZnmxNiTzPNA322SPd4yAWUZI= Received: from aafl13.neoplus.adsl.tpnet.pl (HELO localhost.localdomain) (mat.jonczyk@o2.pl@[83.4.141.13]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with SMTP for ; 21 Apr 2022 21:25:35 +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 , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH v2 2/2] x86/rtc: rename mach_set_rtc_mmss Date: Thu, 21 Apr 2022 21:24:49 +0200 Message-Id: <20220421192449.11004-3-mat.jonczyk@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421192449.11004-1-mat.jonczyk@o2.pl> References: <20220421192449.11004-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-WP-MailID: 98bcf9135cc57123f251e21cff7a9931 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [kbN0] 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 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