summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/coretemp/coretemp.c3
-rw-r--r--sys/dev/hwpmc/hwpmc_intel.c3
-rw-r--r--sys/dev/hwpmc/hwpmc_piv.c3
-rw-r--r--sys/dev/hwpmc/hwpmc_ppro.c3
-rw-r--r--sys/dev/hwpmc/hwpmc_x86.c9
5 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/coretemp/coretemp.c b/sys/dev/coretemp/coretemp.c
index ffd2369..d639eec 100644
--- a/sys/dev/coretemp/coretemp.c
+++ b/sys/dev/coretemp/coretemp.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <machine/specialreg.h>
#include <machine/cpufunc.h>
+#include <machine/cputypes.h>
#include <machine/md_var.h>
struct coretemp_softc {
@@ -94,7 +95,7 @@ coretemp_identify(driver_t *driver, device_t parent)
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
diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c
index ab8c370..80916c6 100644
--- a/sys/dev/hwpmc/hwpmc_intel.c
+++ b/sys/dev/hwpmc/hwpmc_intel.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <machine/cpu.h>
+#include <machine/cputypes.h>
#include <machine/md_var.h>
#include <machine/specialreg.h>
@@ -79,7 +80,7 @@ pmc_intel_initialize(void)
enum pmc_cputype cputype;
int error, model, nclasses, ncpus;
- KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0,
+ KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL,
("[intel,%d] Initializing non-intel processor", __LINE__));
PMCDBG(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id);
diff --git a/sys/dev/hwpmc/hwpmc_piv.c b/sys/dev/hwpmc/hwpmc_piv.c
index 601395c..565be88 100644
--- a/sys/dev/hwpmc/hwpmc_piv.c
+++ b/sys/dev/hwpmc/hwpmc_piv.c
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
+#include <machine/cputypes.h>
#include <machine/md_var.h>
#include <machine/specialreg.h>
@@ -1610,7 +1611,7 @@ pmc_p4_initialize(struct pmc_mdep *md, int ncpus)
struct p4_event_descr *pe;
KASSERT(md != NULL, ("[p4,%d] md is NULL", __LINE__));
- KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0,
+ KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL,
("[p4,%d] Initializing non-intel processor", __LINE__));
PMCDBG(MDP,INI,1, "%s", "p4-initialize");
diff --git a/sys/dev/hwpmc/hwpmc_ppro.c b/sys/dev/hwpmc/hwpmc_ppro.c
index d97d76a0..bc85873 100644
--- a/sys/dev/hwpmc/hwpmc_ppro.c
+++ b/sys/dev/hwpmc/hwpmc_ppro.c
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
+#include <machine/cputypes.h>
#include <machine/md_var.h>
#include <machine/pmc_mdep.h>
#include <machine/specialreg.h>
@@ -779,7 +780,7 @@ pmc_p6_initialize(struct pmc_mdep *md, int ncpus)
{
struct pmc_classdep *pcd;
- KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0,
+ KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL,
("[p6,%d] Initializing non-intel processor", __LINE__));
PMCDBG(MDP,INI,1, "%s", "p6-initialize");
diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c
index dd9c0e9..b48a6b0 100644
--- a/sys/dev/hwpmc/hwpmc_x86.c
+++ b/sys/dev/hwpmc/hwpmc_x86.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <machine/cpu.h>
+#include <machine/cputypes.h>
#include <machine/apicreg.h>
#include <machine/pmc_mdep.h>
#include <machine/md_var.h>
@@ -252,9 +253,9 @@ pmc_md_initialize()
/* determine the CPU kind */
md = NULL;
- if (strcmp(cpu_vendor, "AuthenticAMD") == 0)
+ if (cpu_vendor_id == CPU_VENDOR_AMD)
md = pmc_amd_initialize();
- else if (strcmp(cpu_vendor, "GenuineIntel") == 0)
+ else if (cpu_vendor_id == CPU_VENDOR_INTEL)
md = pmc_intel_initialize();
else
KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__));
@@ -270,9 +271,9 @@ pmc_md_initialize()
void
pmc_md_finalize(struct pmc_mdep *md)
{
- if (strcmp(cpu_vendor, "AuthenticAMD") == 0)
+ if (cpu_vendor_id == CPU_VENDOR_AMD)
pmc_amd_finalize(md);
- else if (strcmp(cpu_vendor, "GenuineIntel") == 0)
+ else if (cpu_vendor_id == CPU_VENDOR_INTEL)
pmc_intel_finalize(md);
else
KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__));
OpenPOWER on IntegriCloud