[RFC] lapic calibration results fix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cyrill Gorcunov
Date: Sunday, July 13, 2008 - 4:37 am

Ingo, Maciej,

it seems I found a bit strange code snippet in apic_32.c:setup_boot_APIC_clock.
We set local_apic_timer_verify_ok = 1 before checking the results. I think
the following patch make sense. Please take a look on.

---
We set lapic flag that clocksource calibration is
fine too early. Fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/apic_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_32.c	2008-07-13 15:25:20.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_32.c	2008-07-13 15:31:03.000000000 +0400
@@ -489,8 +489,6 @@ void __init setup_boot_APIC_clock(void)
 		    calibration_result / (1000000 / HZ),
 		    calibration_result % (1000000 / HZ));
 
-	local_apic_timer_verify_ok = 1;
-
 	/*
 	 * Do a sanity check on the APIC calibration result
 	 */
@@ -504,6 +502,8 @@ void __init setup_boot_APIC_clock(void)
 		return;
 	}
 
+	local_apic_timer_verify_ok = 1;
+
 	/* We trust the pm timer based calibration */
 	if (!pm_referenced) {
 		apic_printk(APIC_VERBOSE, "... verify APIC timer\n");
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] lapic calibration results fix, Cyrill Gorcunov, (Sun Jul 13, 4:37 am)
Re: [RFC] lapic calibration results fix, Cyrill Gorcunov, (Sun Jul 13, 9:23 am)