Skip to content
Commit bbbd9995 authored by David P. Reed's avatar David P. Reed Committed by Thomas Gleixner
Browse files

x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c



Correct potentially unstable PC RTC time register reading in time_64.c

Stop the use of an incorrect technique for reading the standard PC RTC
timer, which is documented to "disconnect" time registers from the bus
while updates are in progress.  The use of UIP flag while interrupts
are disabled to protect a 244 microsecond window is one of the
Motorola spec sheet's documented ways to read the RTC time registers
reliably.

tglx: removed locking changes from original patch, as they gain nothing
(read_persistent_clock is only called during boot, suspend, resume - so
no hot path affected) and conflict with the paravirt locking scheme
(see 32bit code), which we do not want to complicate for no benefit.

Signed-off-by: default avatarDavid P. Reed <dpreed@reed.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c399da0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment