Skip to content

Commit 89d77a1

Browse files
Matt FlemingThomas Gleixner
authored andcommitted
x86: HPET: read from HPET_Tn_CMP() not HPET_T0_CMP
In hpet_next_event() we check that the value we just wrote to HPET_Tn_CMP(timer) has reached the chip. Currently, we're checking that the value we wrote to HPET_Tn_CMP(timer) is in HPET_T0_CMP, which, if timer is anything other than timer 0, is likely to fail. Signed-off-by: Matt Fleming <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 1de5b08 commit 89d77a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/hpet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int hpet_next_event(unsigned long delta,
322322
* what we wrote hit the chip before we compare it to the
323323
* counter.
324324
*/
325-
WARN_ON_ONCE((u32)hpet_readl(HPET_T0_CMP) != cnt);
325+
WARN_ON_ONCE((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt);
326326

327327
return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0;
328328
}

0 commit comments

Comments
 (0)