Module Name:    src
Committed By:   snj
Date:           Thu Apr 22 19:41:49 UTC 2010

Modified Files:
        src/sys/arch/x86/x86 [netbsd-5-0]: identcpu.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #1377):
        sys/arch/x86/x86/identcpu.c: revision 1.19
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.10.4.2 -r1.10.4.2.2.1 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.10.4.2 src/sys/arch/x86/x86/identcpu.c:1.10.4.2.2.1
--- src/sys/arch/x86/x86/identcpu.c:1.10.4.2	Mon Feb  2 18:50:01 2009
+++ src/sys/arch/x86/x86/identcpu.c	Thu Apr 22 19:41:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.10.4.2 2009/02/02 18:50:01 snj Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.10.4.2.2.1 2010/04/22 19:41:49 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.2 2009/02/02 18:50:01 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.2.2.1 2010/04/22 19:41:49 snj Exp $");
 
 #include "opt_enhanced_speedstep.h"
 #include "opt_intel_odcm.h"
@@ -698,7 +698,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;

Reply via email to