x86: hpet: fix periodic mode programming on AMD 81xx
commit7a6f9cbb37120c745fc187083fb5c3de4dca4f97
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Tue, 21 Apr 2009 18:00:37 +0000 (21 20:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 22 Apr 2009 13:53:40 +0000 (22 15:53 +0200)
treeb943ff6c61085506cde9d92bfb5b859b5b3c6872
parent3568b71d46bea87da1936902b6fbb2a3b1154b3d
x86: hpet: fix periodic mode programming on AMD 81xx

(See http://bugzilla.kernel.org/show_bug.cgi?id=12961)

It partially reverts commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403
(x86: hpet: stop HPET_COUNTER when programming periodic mode)

HPET on AMD 81xx chipset needs a second write (with HPET_TN_SETVAL
cleared) to T0_CMP register to set the period in periodic mode.

With this patch HPET_COUNTER is still stopped but not reset when HPET
is programmed in periodic mode. This should help to avoid races when
HPET is programmed in periodic mode and fixes a boot time hang that
I've observed on a machine when using 1000HZ.

[ Impact: fix boot time hang on machines with AMD 81xx chipset ]

Reported-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Tested-by: Jeff Mahoney <jeffm@suse.com>
LKML-Reference: <20090421180037.GA2763@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/hpet.c