You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qubes-linux-kernel/patches.arch/x86-hpet-pre-read

27 lines
812 B

From: Takashi Iwai <tiwai@suse.de>
Subject: x86: workaround for mccreary HPET read problem
Patch-mainline: not yet
References: bnc#433746
On mccreacy platform, the read of HPET CMP register seems not updated
immediately after the write and returns the previous value instead.
A workaround is to read the register twice.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
---
arch/x86/kernel/hpet.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -385,6 +385,7 @@ static int hpet_next_event(unsigned long
cnt += (u32) delta;
hpet_writel(cnt, HPET_Tn_CMP(timer));
+ hpet_readl(HPET_Tn_CMP(timer)); /* pre-read for bnc#433746 */
/*
* We need to read back the CMP register on certain HPET
* implementations (ATI chipsets) which seem to delay the