Skip to contentSkip to conversation

x86/mrst: assign a guessed cpu_khz value before calibration

PATCH New Jacob Pan 1 participant 1 message Jun 30, 2010 x86

lore
Share & tools
lore

Jacob Pan

author
#0 lore raw

PATCH 1/1 x86/mrst: assign a guessed cpu_khz value before calibration

The new setup_local_APIC() code introduced by commit 8c3ba8d0 requires a valid cpu_khz value used as max loop count for clearing pending interrupts. However, Moorestown does a early APIC setup for the system timer interrupts which is before a valid cpu_khz is assigned in tsc calibration code.

This patch assigns a guessed value for cpu_khz to avoid a warning in local APIC setup code. The acuracy of cpu_khz is not important at the point of local APIC setup.

---
 arch/x86/kernel/mrst.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
arch/x86/kernel/mrst.c +6 -1
index 5fd5f9c..4901554 100644
@@ -387,7 +387,12 @@ void __init x86_mrst_early_setup(void)
 	/* Avoid searching for BIOS MP tables */
 	x86_init.mpparse.find_smp_config = x86_init_noop;
 	x86_init.mpparse.get_smp_config = x86_init_uint_noop;
-
+	/*
+	 * Give an estimated CPU frequency which will be used by early local
+	 * APIC setup code prior to calibration. The true value will be set
+	 * in tsc calibration later.
+	 */
+	cpu_khz = 1500000;
 }
 
 /*
Signature · 1 line
1.7.0.4