Module Name:    src
Committed By:   snj
Date:           Thu Apr 22 19:56:45 UTC 2010

Modified Files:
        src/sys/arch/x86/x86 [netbsd-5]: 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.4 -r1.10.4.5 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.4 src/sys/arch/x86/x86/identcpu.c:1.10.4.5
--- src/sys/arch/x86/x86/identcpu.c:1.10.4.4	Mon Oct  5 11:37:14 2009
+++ src/sys/arch/x86/x86/identcpu.c	Thu Apr 22 19:56:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.10.4.4 2009/10/05 11:37:14 sborrill Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.10.4.5 2010/04/22 19:56:44 snj 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.10.4.4 2009/10/05 11:37:14 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.5 2010/04/22 19:56:44 snj Exp $");
 
 #include "opt_enhanced_speedstep.h"
 #include "opt_intel_odcm.h"
@@ -623,7 +623,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