Date: Thu, 22 Jan 2009 17:06:33 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187594 - in head/sys: compat/linprocfs i386/cpufreq Message-ID: <200901221706.n0MH6XN1017768@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Thu Jan 22 17:06:33 2009 New Revision: 187594 URL: http://svn.freebsd.org/changeset/base/187594 Log: Replace couple of strcmp(cpu_vendor, "foo") with cpu_vendor_id for i386 and hide i386-specific code under #ifdef. Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/i386/cpufreq/smist.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Thu Jan 22 15:52:13 2009 (r187593) +++ head/sys/compat/linprocfs/linprocfs.c Thu Jan 22 17:06:33 2009 (r187594) @@ -276,11 +276,17 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) sbuf_cat(sb, "flags\t\t:"); - if (!strcmp(cpu_vendor, "AuthenticAMD") && (class < 6)) { - flags[16] = "fcmov"; - } else if (!strcmp(cpu_vendor, "CyrixInstead")) { +#ifdef __i386__ + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + if (class < 6) + flags[16] = "fcmov"; + break; + case CPU_VENDOR_CYRIX: flags[24] = "cxmmx"; + break; } +#endif for (i = 0; i < 32; i++) if (cpu_feature & (1 << i)) Modified: head/sys/i386/cpufreq/smist.c ============================================================================== --- head/sys/i386/cpufreq/smist.c Thu Jan 22 15:52:13 2009 (r187593) +++ head/sys/i386/cpufreq/smist.c Thu Jan 22 17:06:33 2009 (r187594) @@ -285,7 +285,7 @@ smist_identify(driver_t *driver, device_ return; /* Check for a supported processor */ - if (strcmp(cpu_vendor, "GenuineIntel") != 0) + if (cpu_vendor_id != CPU_VENDOR_INTEL) return; switch (cpu_id & 0xff0) { case 0x680: /* Pentium III [coppermine] */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901221706.n0MH6XN1017768>