x86: hpet: stop HPET_COUNTER when programming periodic mode
commit5beb01f947a1607c094f053d6575b4f647b7016c
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Fri, 29 May 2009 21:35:14 +0000 (29 17:35 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Jun 2009 16:40:21 +0000 (15 09:40 -0700)
treecbd2d43931fc5a2fdceba9588405b18c553fba5b
parent8c68c89bc518df5fb21112be68c94fcd25b8b2de
x86: hpet: stop HPET_COUNTER when programming periodic mode

commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403 upstream

x86: hpet: stop HPET_COUNTER when programming periodic mode

Impact: fix system hang on some systems operating with HZ_1000

On a system that stalled with HZ_1000, the first value written to
T0_CMP (when the main counter was not stopped) did not trigger an
interrupt. Instead after the main counter wrapped around (after
several minutes) an interrupt was triggered and afterwards the
periodic interrupt took effect.

This can be fixed by implementing HPET spec recommendation for
programming the periodic mode (i.e. stopping the main counter).

[cebbert@redhat.com: backport to 2.6.29]

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Mark Hounschell <markh@compro.net>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/hpet.c