diff options
| -rw-r--r-- | arch/x86/kernel/hpet.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 801497a16e0e..73deaffadd03 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
| @@ -278,6 +278,13 @@ static int hpet_legacy_next_event(unsigned long delta, | |||
| 278 | cnt += (u32) delta; | 278 | cnt += (u32) delta; |
| 279 | hpet_writel(cnt, HPET_T0_CMP); | 279 | hpet_writel(cnt, HPET_T0_CMP); |
| 280 | 280 | ||
| 281 | /* | ||
| 282 | * We need to read back the CMP register to make sure that | ||
| 283 | * what we wrote hit the chip before we compare it to the | ||
| 284 | * counter. | ||
| 285 | */ | ||
| 286 | WARN_ON((u32)hpet_readl(HPET_T0_CMP) != cnt); | ||
| 287 | |||
| 281 | return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; | 288 | return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; |
| 282 | } | 289 | } |
| 283 | 290 | ||
