Module Name:    src
Committed By:   msaitoh
Date:           Tue Nov 12 15:08:01 UTC 2013

Modified Files:
        src/sys/arch/x86/pci: amdtemp.c

Log Message:
 Calcurate the processor family correctly. The extended family bits
should be added only when the base family is 0xf.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/pci/amdtemp.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/pci/amdtemp.c
diff -u src/sys/arch/x86/pci/amdtemp.c:1.16 src/sys/arch/x86/pci/amdtemp.c:1.17
--- src/sys/arch/x86/pci/amdtemp.c:1.16	Mon Jul 16 01:52:37 2012
+++ src/sys/arch/x86/pci/amdtemp.c	Tue Nov 12 15:08:01 2013
@@ -1,4 +1,4 @@
-/*      $NetBSD: amdtemp.c,v 1.16 2012/07/16 01:52:37 pgoyette Exp $ */
+/*      $NetBSD: amdtemp.c,v 1.17 2013/11/12 15:08:01 msaitoh Exp $ */
 /*      $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $   */
 
 /*
@@ -48,7 +48,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdtemp.c,v 1.16 2012/07/16 01:52:37 pgoyette Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdtemp.c,v 1.17 2013/11/12 15:08:01 msaitoh Exp $ ");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -239,7 +239,8 @@ amdtemp_attach(device_t parent, device_t
 	KASSERT(cpu_signature != 0x0);
 
 	sc->sc_family = CPUID2FAMILY(cpu_signature);
-	sc->sc_family += CPUID2EXTFAMILY(cpu_signature);
+	if (sc->sc_family == 0xf)
+		sc->sc_family += CPUID2EXTFAMILY(cpu_signature);
 
 	KASSERT(sc->sc_family >= 0xf);
 

Reply via email to