Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp119840iob; Tue, 17 May 2022 20:52:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWG/1sRY3Lqo34BhEcyKyUEiTQcVTkEdq6yJdT2DCtBcwlJ+096z5+AC/qYRrouXdggLev X-Received: by 2002:a63:4a1f:0:b0:3db:aa1a:48bf with SMTP id x31-20020a634a1f000000b003dbaa1a48bfmr18994316pga.72.1652845977613; Tue, 17 May 2022 20:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652845977; cv=none; d=google.com; s=arc-20160816; b=p69FT6IJm4VOj4xbBHgMXzyz7QGxHip1BkeuIhVWepPwnPhGTV0X0OJpnMKop4s5Tn 0golMr2ahFU/3qj6XttgmyReo0LRn4fMXDXlD89QfWc+yKrWofiVjxHiGWdN30tAoWxG 9JP9vJbHyy7Wr8WFNNeDmWtuzdBlflFSPmhZ238xk+P8jrSG/Tlasi24k0z3rDyEHyOL QnB7B4JGDpaMf1jy7kipiaRbtLgk26WdRRFfuA76quB5U2Mr/4KK0ReoVY8RUwWfN5Sa VgBYLqWTpl2JgIo+TZbxNtUr8xfOYfmV26tg3/LZ/z6Ud7Ccl+bAsJeWURuuV6AukcKx DLlA== 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=iMnkwwcgkRQnDEbHbyihhtkLo3AnSPyvGVvhigcz/wQ=; b=RcHPMkJLgV1gn8qytmoTzN+jBeiDv6Udb6EpOrNNC2RSAbSzCUl+PVMhO19wWuw6nU Mx3wWrpkiQUYUr6Y2Yh8cqPQTVDQ7aszJReG0qigSBHKOeO0bNOQEywQKQ7nj18xm2A9 k4coxn/8Emxp/pQK265xK8gb8CblakevotxTHlMutUdpDo/xyfeL/9hJCpmUUNT4jYDv paNbJO/Ie4nwEpE3tfBTdfjiHayyxlqs8NL5T7VDsd5djChVyVJhILaogekNNhl8k6ER AwuHdALXbKmQCMeXg4BgCiOdGPk05KiKqtjlnztq6tBm42NkvEDEl8syZZX8H2fgHD2c oHZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=wbdwRHHC; 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 b16-20020aa78ed0000000b0050604ac89e3si1360873pfr.345.2022.05.17.20.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:52:57 -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=wbdwRHHC; 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 A2C219344A; Tue, 17 May 2022 20:34:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352914AbiEQUWQ (ORCPT + 99 others); Tue, 17 May 2022 16:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350882AbiEQUWG (ORCPT ); Tue, 17 May 2022 16:22:06 -0400 Received: from mx-out.tlen.pl (mx-out.tlen.pl [193.222.135.148]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0603C522EA for ; Tue, 17 May 2022 13:22:02 -0700 (PDT) Received: (wp-smtpd smtp.tlen.pl 23163 invoked from network); 17 May 2022 22:21:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1652818917; bh=iMnkwwcgkRQnDEbHbyihhtkLo3AnSPyvGVvhigcz/wQ=; h=From:To:Cc:Subject; b=wbdwRHHCksWIFUlj+g9uIxBfeoRccU+WyZJN2o2kiKP3kaA/Ih+8QGccJZJrbOAzL dzGoPPZiS/b55VQeCRtCvHXyT9vzE7Xrb8DQKpLbBE8fExfklylBS46S7korX6R4aM v6DerqqdYWGhYHV/hYaZXcs8hmEueDHBxON7f4Ew= 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:21:57 +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" , Alessandro Zummo , Alexandre Belloni Subject: [PATCH v2 resend 0/2] x86/rtc: refactoring Date: Tue, 17 May 2022 22:21:29 +0200 Message-Id: <20220517202131.379939-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: 3f74181e37c2ca240d5ab56c2001b014 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [8QOU] 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 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 common mc146818_get_time(). The second patch renames a function in arch/x86/kernel/rtc.c. Tested originally (on top of 5.18-rc3) on 3 computers, and in i386 and amd64 VMs. 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. 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: 42226c989789d8da4af1de0c31070c96726d990c -- 2.25.1