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 only attach on SMT ID 0 cpus.
details: https://anonhg.NetBSD.org/src/rev/e5a9909f6f30
branches: trunk
changeset: 757113:e5a9909f6f30
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Aug 15 08:45:20 2010 +0000
description:
only attach on SMT ID 0 cpus.
on my i7, cpus 0/4, 1/5, 2/6 and 3/7 have identical information and the
processor manual says that there are only 4 actual sensors.
this still doesn't attach (yet) on that system, due to a core solo/duo
errata being wrongly applied, but i haven't figured out the right way
to do that.
diffstat:
sys/arch/x86/x86/coretemp.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 90eb8ba1a0e6 -r e5a9909f6f30 sys/arch/x86/x86/coretemp.c
--- a/sys/arch/x86/x86/coretemp.c Sun Aug 15 07:52:26 2010 +0000
+++ b/sys/arch/x86/x86/coretemp.c Sun Aug 15 08:45:20 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coretemp.c,v 1.14 2010/03/14 18:04:29 pgoyette Exp $ */
+/* $NetBSD: coretemp.c,v 1.15 2010/08/15 08:45:20 mrg Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.14 2010/03/14 18:04:29 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.15 2010/08/15 08:45:20 mrg Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -70,6 +70,12 @@
int cpumodel, cpuextmodel, cpumask;
/*
+ * Don't attach on anything but the first SMT ID.
+ */
+ if (ci->ci_smt_id != 0)
+ return;
+
+ /*
* CPUID 0x06 returns 1 if the processor has on-die thermal
* sensors. EBX[0:3] contains the number of sensors.
*/
Home |
Main Index |
Thread Index |
Old Index