lkml.org 
[lkml]   [2021]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND 2/6] rtc-cmos: dont touch alarm registers during update
On Sun, Oct 17, 2021 at 09:39:23PM +0200, Mateusz Jończyk wrote:
> Some Intel chipsets disconnect the time and date RTC registers when the
> clock update is in progress: during this time reads may return bogus
> values and writes fail silently. This includes the RTC alarm registers.
> [1]
>
> cmos_read_alarm() and cmos_set_alarm() did not take account for that,
> which caused alarm time reads to sometimes return bogus values. This can
> be shown with a test patch that I am attaching to this patch series.
> Setting the alarm clock also probably did fail sometimes.
>
> To make this patch suitable for inclusion in stable kernels, I'm using a
> simple method for avoiding the RTC update cycle. This method is used in
> mach_set_rtc_mmss() in arch/x86/kernel/rtc.c. A more elaborate algorithm
> - as in mc146818_get_time() in drivers/rtc/rtc-mc146818-lib.c - would be
> too complcated for stable. [2]

No, just do it properly the first time, do not worry about stable
kernels, we can just take the also-correct version for backporting if
needed.

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-10-18 07:59    [W:0.043 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site