[Midnightbsd-cvs] src [7753] trunk/sys/dev/coretemp/coretemp.c: use cpu vendor id to detect

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Aug 21 00:26:11 EDT 2016


Revision: 7753
          http://svnweb.midnightbsd.org/src/?rev=7753
Author:   laffer1
Date:     2016-08-21 00:26:11 -0400 (Sun, 21 Aug 2016)
Log Message:
-----------
use cpu vendor id to detect

Modified Paths:
--------------
    trunk/sys/dev/coretemp/coretemp.c

Modified: trunk/sys/dev/coretemp/coretemp.c
===================================================================
--- trunk/sys/dev/coretemp/coretemp.c	2016-08-21 00:07:05 UTC (rev 7752)
+++ trunk/sys/dev/coretemp/coretemp.c	2016-08-21 04:26:11 UTC (rev 7753)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/coretemp/coretemp.c,v 1.5 2010/03/05 03:40:43 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2007, 2008 Rui Paulo <rpaulo at FreeBSD.org>
  * All rights reserved.
@@ -46,6 +46,7 @@
 
 #include <machine/specialreg.h>
 #include <machine/cpufunc.h>
+#include <machine/cputypes.h>
 #include <machine/md_var.h>
 
 extern int smp_cpus;
@@ -98,7 +99,7 @@
 		return;
 
 	/* Check that CPUID 0x06 is supported and the vendor is Intel.*/
-	if (cpu_high < 6 || strcmp(cpu_vendor, "GenuineIntel"))
+	if (cpu_high < 6 || cpu_vendor_id != CPU_VENDOR_INTEL)
 		return;
 	/*
 	 * CPUID 0x06 returns 1 if the processor has on-die thermal



More information about the Midnightbsd-cvs mailing list