Module Name: src Committed By: jym Date: Sun Apr 18 15:25:53 UTC 2010
Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: Fix a test semantic in cpu_probe(): check that the CPU currently probed is the first one booting by comparing its struct cpu_info address with cpu_info_primary, rather than supposing that cpu_feature variables are set to 0. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/x86/identcpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.18 src/sys/arch/x86/x86/identcpu.c:1.19 --- src/sys/arch/x86/x86/identcpu.c:1.18 Mon Jan 18 16:40:18 2010 +++ src/sys/arch/x86/x86/identcpu.c Sun Apr 18 15:25:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.18 2010/01/18 16:40:18 rmind Exp $ */ +/* $NetBSD: identcpu.c,v 1.19 2010/04/18 15:25:53 jym Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.18 2010/01/18 16:40:18 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.19 2010/04/18 15:25:53 jym Exp $"); #include "opt_enhanced_speedstep.h" #include "opt_intel_odcm.h" @@ -660,7 +660,7 @@ wrmsr(MSR_MISC_ENABLE, rdmsr(MSR_MISC_ENABLE) | (1<<3)); } - if ((cpu_feature | cpu_feature2) == 0) { + if (ci == &cpu_info_primary) { /* If first. */ cpu_feature = ci->ci_feature_flags; cpu_feature2 = ci->ci_feature2_flags;