]> git.baikalelectronics.ru Git - kernel.git/commit
x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c
authorDavid P. Reed <dpreed@reed.com>
Thu, 15 Nov 2007 01:14:50 +0000 (20:14 -0500)
committerThomas Gleixner <tglx@apollo.(none)>
Sat, 17 Nov 2007 15:27:01 +0000 (16:27 +0100)
commit22895732d21384c788e64cafa3e3c3e5be69b452
treeef9c2f2a675523fba0ae84ae7d3514d804f0ec1e
parentdc75d8ed619f25843763c89f816b023c9f135bac
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: David P. Reed <dpreed@reed.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/time_64.c