Skip to content

Commit e1a6bc7

Browse files
matjonIngo Molnar
authored andcommitted
x86/rtc: Rename mach_set_rtc_mmss() to mach_set_cmos_time()
Once upon a time, before this commit in 2013: 3195ef5 ("x86: Do full rtc synchronization with ntp") ... the mach_set_rtc_mmss() function set only the minutes and seconds registers of the CMOS RTC - hence the '_mmss' postfix. This is no longer true, so rename the function to mach_set_cmos_time(). [ mingo: Expanded changelog a bit. ] Signed-off-by: Mateusz Jończyk <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fc04b2c commit e1a6bc7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

arch/x86/include/asm/mc146818rtc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static inline unsigned char current_lock_cmos_reg(void)
9595
unsigned char rtc_cmos_read(unsigned char addr);
9696
void rtc_cmos_write(unsigned char val, unsigned char addr);
9797

98-
extern int mach_set_rtc_mmss(const struct timespec64 *now);
98+
extern int mach_set_cmos_time(const struct timespec64 *now);
9999
extern void mach_get_cmos_time(struct timespec64 *now);
100100

101101
#define RTC_IRQ 8

arch/x86/kernel/rtc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ DEFINE_SPINLOCK(rtc_lock);
2727
EXPORT_SYMBOL(rtc_lock);
2828

2929
/*
30-
* In order to set the CMOS clock precisely, set_rtc_mmss has to be
30+
* In order to set the CMOS clock precisely, mach_set_cmos_time has to be
3131
* called 500 ms after the second nowtime has started, because when
3232
* nowtime is written into the registers of the CMOS clock, it will
3333
* jump to the next second precisely 500 ms later. Check the Motorola
3434
* MC146818A or Dallas DS12887 data sheet for details.
3535
*/
36-
int mach_set_rtc_mmss(const struct timespec64 *now)
36+
int mach_set_cmos_time(const struct timespec64 *now)
3737
{
3838
unsigned long long nowtime = now->tv_sec;
3939
struct rtc_time tm;

arch/x86/kernel/x86_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ struct x86_platform_ops x86_platform __ro_after_init = {
138138
.calibrate_cpu = native_calibrate_cpu_early,
139139
.calibrate_tsc = native_calibrate_tsc,
140140
.get_wallclock = mach_get_cmos_time,
141-
.set_wallclock = mach_set_rtc_mmss,
141+
.set_wallclock = mach_set_cmos_time,
142142
.iommu_shutdown = iommu_shutdown_noop,
143143
.is_untracked_pat_range = is_ISA_range,
144144
.nmi_init = default_nmi_init,

0 commit comments

Comments
 (0)