Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp836590pxb; Fri, 22 Apr 2022 12:13:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyfxFmPLSa2vWoRw+wd6Eoc2FhCTT8O2OCPVXYs0eTVl4rANeZfFH8yDNovMhgFWVP8SEt X-Received: by 2002:a63:f44e:0:b0:3aa:e66:f774 with SMTP id p14-20020a63f44e000000b003aa0e66f774mr5180354pgk.381.1650654818743; Fri, 22 Apr 2022 12:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654818; cv=none; d=google.com; s=arc-20160816; b=0bJgXW0qhHVUo85UwMXht0hM5Vn8aVGnDFOvfV100s3DjqncNwBU1R4NR4ysGsWoaX w4V1E+Klz68bI7+GlQ24z6gwaZ9NnB4Gtw1LVBhLVk4K5Z6+h5Fmv/pnw8i9dWj+Mf6i 4040FCPsAZCqknhGaVebkWZ5vqyvRIubf4vTDx7XvqnR/1fxA3E7uE4XTfbyHuiCmVMA Ia391ZA18Sac0O2Jopbv1E1qjnJ2E4ULmdV8YKyAFCp37apgSkYanvBXG/PDeVHVT5/r lZHMEgFrfZVB3969Oj1KhXhSTufpPyYbIbXlqBBQY4gKkE6WKuAEejXu4yl9YcIjxsc4 eyng== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cL8/ZnaB/KGYG+SGDO68j65XoxyE6Adoj+9820riXYg=; b=IYm0lFeaGuMxExKSZWcNESYbJYGmns+6d0PmbMA/LUMPc0zCmaCJ7zrq4M13LZY6+V LkROYTki7r/jAsszuCMZt/mqHyaqyrJZnnTI7mGr3OrUICzFrBGqhSQy12LRi95pgauh 7HPxTZeGkOMAga3XXsVBqyudgSvQhAcfi96w/ai3n8CybsTL/KC4PKkgNfvWswZhZxhm 48KXcVCmvhC4RJN7YOkMlTWReJkayHkLcjfOZHLQv1lca0QgGkPrTAWJL04lc6P+sJof Q3LjXmCdNSduly2oqecBLQJ6pesJUPkzKl8gl5qul2Y1tYb0vRJlNOKpIpfg0phMhL8p nyCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=WUOZGSM8; 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 c63-20020a621c42000000b00505b362ec7esi8072607pfc.207.2022.04.22.12.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:13:38 -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=WUOZGSM8; 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 A4443151F2C; Fri, 22 Apr 2022 11:30:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386826AbiDUT2S (ORCPT + 99 others); Thu, 21 Apr 2022 15:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347468AbiDUT2P (ORCPT ); Thu, 21 Apr 2022 15:28:15 -0400 Received: from mx-out.tlen.pl (mx-out.tlen.pl [193.222.135.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B3922B for ; Thu, 21 Apr 2022 12:25:23 -0700 (PDT) Received: (wp-smtpd smtp.tlen.pl 7750 invoked from network); 21 Apr 2022 21:25:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1650569118; bh=cL8/ZnaB/KGYG+SGDO68j65XoxyE6Adoj+9820riXYg=; h=From:To:Cc:Subject; b=WUOZGSM87IvSYQsX6ghg9tbHg8LTh/+S6mJfDvNWvxl+Xig4ulmN1iHt5NhSAaZMi 7zclYU0m6O/xS+FYd1p1c262yCu7V2vo4ST4575BSsBOK5aQameeVb4yDmkvM3P3HS Fn0D8w9lZ5z8FHmI6e2XxocKjrN6a7KnzfeivuYE= 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:18 +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" , Alessandro Zummo , Alexandre Belloni Subject: [PATCH v2 0/2] x86/rtc: refactoring Date: Thu, 21 Apr 2022 21:24:47 +0200 Message-Id: <20220421192449.11004-1-mat.jonczyk@o2.pl> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-WP-MailID: fcb26315dbc1799316f4225d272121ef X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [gXMk] 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 Hello, The first and main patch of this series removes duplicated code in mach_get_cmos_time() in arch/x86/kernel/rtc.c . This function performed the same thing as mc146818_get_time() - reading the time from the CMOS RTC - but used a different algorithm. So modify it to use standard mc146818_get_time(). The second patch renames a function in arch/x86/kernel/rtc.c. Greetings, Mateusz v2: - drop the previously first patch ("rtc-mc146818-lib: reduce RTC_UIP polling period"). Its intent was to make behaviour of mc146818_get_time() more similar to the existing version of mach_get_cmos_time() by decreasing the polling period in mc146818_get_time(). However, I determined that this does not matter for users of mach_get_cmos_time(). - use pr_err instead of pr_err_ratelimited in the first remaining patch, - small patch description modifications. Tested on 3 computers, and on i386 and amd64 VMs. 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" Cc: Alessandro Zummo Cc: Alexandre Belloni Mateusz Jończyk (2): x86/rtc: rewrite mach_get_cmos_time to delete duplicated code x86/rtc: rename mach_set_rtc_mmss arch/x86/include/asm/mc146818rtc.h | 2 +- arch/x86/kernel/rtc.c | 63 +++++------------------------- arch/x86/kernel/x86_init.c | 2 +- 3 files changed, 11 insertions(+), 56 deletions(-) base-commit: b2d229d4ddb17db541098b83524d901257e93845 -- 2.25.1