mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mateusz Jończyk" <mat.jonczyk@o2.pl>
To: linux-kernel@vger.kernel.org
Cc: "Mateusz Jończyk" <mat.jonczyk@o2.pl>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Borislav Petkov" <bp@alien8.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Alessandro Zummo" <a.zummo@towertech.it>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: [PATCH v2 resend 0/2] x86/rtc: refactoring
Date: Tue, 17 May 2022 22:21:29 +0200	[thread overview]
Message-ID: <20220517202131.379939-1-mat.jonczyk@o2.pl> (raw)

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 <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>

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


             reply	other threads:[~2022-05-17 20:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 20:21 Mateusz Jończyk [this message]
2022-05-17 20:21 ` [PATCH v2 resend 1/2] x86/rtc: rewrite mach_get_cmos_time to delete duplicated code Mateusz Jończyk
2022-05-17 22:12   ` Alexandre Belloni
2022-05-17 20:21 ` [PATCH v2 resend 2/2] x86/rtc: rename mach_set_rtc_mmss Mateusz Jończyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220517202131.379939-1-mat.jonczyk@o2.pl \
    --to=mat.jonczyk@o2.pl \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®