Module Name: src Committed By: mrg Date: Sun Aug 15 08:45:20 UTC 2010
Modified Files: src/sys/arch/x86/x86: coretemp.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/x86/coretemp.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/coretemp.c diff -u src/sys/arch/x86/x86/coretemp.c:1.14 src/sys/arch/x86/x86/coretemp.c:1.15 --- src/sys/arch/x86/x86/coretemp.c:1.14 Sun Mar 14 18:04:29 2010 +++ src/sys/arch/x86/x86/coretemp.c Sun Aug 15 08:45:20 2010 @@ -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. */