From 53944085b75f1cebecdd5a33628d8187d4c3ea29 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 4 Sep 2008 22:47:47 +0200 Subject: [PATCH] --- yaml --- r: 110436 b: refs/heads/master c: 4156e9a8ef5b521185f451213d33fa661f38512e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/tsc.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7309ca6a13a1..33eed19173b6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6ac40ed0413ef4096720f966e11c7cdf259eee3f +refs/heads/master: 4156e9a8ef5b521185f451213d33fa661f38512e diff --git a/trunk/arch/x86/kernel/tsc.c b/trunk/arch/x86/kernel/tsc.c index 839070ba8465..6dab90f68515 100644 --- a/trunk/arch/x86/kernel/tsc.c +++ b/trunk/arch/x86/kernel/tsc.c @@ -316,6 +316,12 @@ static unsigned long quick_pit_calibrate(void) } t2 = get_cycles(); + /* + * Make sure we can rely on the second TSC timestamp: + */ + if (!pit_expect_msb(--expect)) + goto failed; + /* * Ok, if we get here, then we've seen the * MSB of the PIT decrement QUICK_PIT_ITERATIONS