Skip to contentSkip to conversation

x86: trivial - reenable Skipped synchronization message once at boot

PATCH New Pallipadi, Venkatesh 1 participant 1 message Dec 17, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: trivial - reenable Skipped synchronization message once at boot

commit 9b3660a5 changed below

- printk_once(KERN_INFO "Skipping synchronization checks
as TSC is
+ if (cpu == (nr_cpu_ids-1) || system_state !=
SYSTEM_BOOTING)
+ pr_info(
+ "Skipped synchronization checks as TSC is
reliable.\n");

which results in "Skipped synchronization checks as TSC is reliable" message missing from my dmesg. The problem is that nr_cpu_ids is number of possible CPUs, and courtesy extra disabled cpus in my bios, that number is higher than real cpus.

Change the check to num_present_cpus() - 1, which gets us back to old behavior of printing this message once at boot.

---
 arch/x86/kernel/tsc_sync.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/x86/kernel/tsc_sync.c +3 -1
index 0aa5fed..6fe5184 100644
@@ -114,9 +114,11 @@ void __cpuinit check_tsc_sync_source(int cpu)
 		return;
 
 	if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
-		if (cpu == (nr_cpu_ids-1) || system_state != SYSTEM_BOOTING)
+		if (cpu == (num_present_cpus() - 1) ||
+		    system_state != SYSTEM_BOOTING) {
 			pr_info(
 			"Skipped synchronization checks as TSC is reliable.\n");
+		}
 		return;
 	}
 
Signature · 1 line
1.6.0.6