Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Fix a test semantic in cpu_probe(): check t...
details: https://anonhg.NetBSD.org/src/rev/093e663d38dc
branches: trunk
changeset: 754066:093e663d38dc
user: jym <jym%NetBSD.org@localhost>
date: Sun Apr 18 15:25:53 2010 +0000
description:
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.
diffstat:
sys/arch/x86/x86/identcpu.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 12df84d3a04b -r 093e663d38dc sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c Sun Apr 18 15:24:54 2010 +0000
+++ b/sys/arch/x86/x86/identcpu.c Sun Apr 18 15:25:53 2010 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index