]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
commit396e2c6fed4ff13b53ce0e573105531cf53b0cad
tree77449d826523f8bbe62fa7f733095e6544547cfe
parentfebb72a6e4cc6c8cffcc1ea649a3fb364f1ea432
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