svn commit: r184103 - head/sys/i386/cpufreq

Jung-uk Kim jkim at FreeBSD.org
Tue Oct 21 00:44:06 UTC 2008


Author: jkim
Date: Tue Oct 21 00:44:05 2008
New Revision: 184103
URL: http://svn.freebsd.org/changeset/base/184103

Log:
  Use power management information for AMD CPUs from identcpu.c.

Modified:
  head/sys/i386/cpufreq/powernow.c

Modified: head/sys/i386/cpufreq/powernow.c
==============================================================================
--- head/sys/i386/cpufreq/powernow.c	Tue Oct 21 00:38:00 2008	(r184102)
+++ head/sys/i386/cpufreq/powernow.c	Tue Oct 21 00:44:05 2008	(r184103)
@@ -758,22 +758,6 @@ pn_decode_pst(device_t dev)
 	return (ENODEV);
 }
 
-/*
- * TODO: this should be done in sys/ARCH/ARCH/identcpu.c
- */
-static int
-cpu_is_powernow_capable(void)
-{
-	u_int regs[4];
-
-	if (strcmp(cpu_vendor, "AuthenticAMD") != 0 ||
-	    cpu_exthigh < 0x80000007)
-		return (FALSE);
-
-	do_cpuid(0x80000007, regs);
-	return (regs[3] & 0x6);
-}
-
 static int
 pn_decode_acpi(device_t dev, device_t perf_dev)
 {
@@ -883,7 +867,7 @@ pn_identify(driver_t *driver, device_t p
 {
 	device_t child;
 
-	if (cpu_is_powernow_capable() == 0)
+	if ((amd_pminfo & (AMDPM_FID | AMDPM_VID)) == 0)
 		return;
 	switch (cpu_id & 0xf00) {
 	case 0x600:


More information about the svn-src-head mailing list