]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Clear HPET configuration registers on startup
authorJan Beulich <JBeulich@suse.com>
Mon, 2 Apr 2012 14:15:55 +0000 (15:15 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 7 May 2012 13:06:27 +0000 (15:06 +0200)
commit0ab2a6631a8586fdc6d0e0e1117be9a8e6af8f87
tree77449d826523f8bbe62fa7f733095e6544547cfe
parentda746b9a0706e8da0c27dc2cb7fcd1fa1039726e
x86: Clear HPET configuration registers on startup

While Linux itself has been calling hpet_disable() for quite a
while, having e.g. a secondary (kexec) kernel depend on such
behavior of the primary (crashed) environment is fragile. It
particularly broke until very recently when the primary
environment was Xen based, as that hypervisor did not clear any
of the HPET settings it may have used.

Rather than blindly (and incompletely) clearing certain HPET
settings in hpet_disable(), latch the config register settings
during boot and restore then here.

(Note on the hpet_set_mode() change: Now that we're clearing the
level bit upon initialization, there's no need anymore to do so
here.)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4F79D0BB020000780007C02D@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/hpet.c