Module Name:    src
Committed By:   msaitoh
Date:           Tue Nov 12 16:35:57 UTC 2013

Modified Files:
        src/sys/arch/x86/x86: cpu_topology.c

Log Message:
 Fix calculation of the cpu family (display family) in x86_cpu_topology().
More than bit 3 in cpu_family variable is checked in the function, so the
variable is assumed that it is not the base family but the display family
(base family + extended family).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/cpu_topology.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/cpu_topology.c
diff -u src/sys/arch/x86/x86/cpu_topology.c:1.6 src/sys/arch/x86/x86/cpu_topology.c:1.7
--- src/sys/arch/x86/x86/cpu_topology.c:1.6	Sat May 29 05:53:57 2010
+++ src/sys/arch/x86/x86/cpu_topology.c	Tue Nov 12 16:35:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_topology.c,v 1.6 2010/05/29 05:53:57 rmind Exp $	*/
+/*	$NetBSD: cpu_topology.c,v 1.7 2013/11/12 16:35:57 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2009 Mindaugas Rasiukevicius <rmind at NetBSD org>,
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.6 2010/05/29 05:53:57 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.7 2013/11/12 16:35:57 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/bitops.h>
@@ -58,6 +58,8 @@ x86_cpu_topology(struct cpu_info *ci)
 
 	apic_id = ci->ci_initapicid;
 	cpu_family = CPUID2FAMILY(ci->ci_signature);
+	if (cpu_family == 0xf)
+		cpu_family += CPUID2EXTFAMILY(ci->ci_signature);
 
 	/* Initial values. */
 	ci->ci_package_id = apic_id;

Reply via email to