svn commit: r221102 - head/sys/x86/cpufreq
Jung-uk Kim
jkim at FreeBSD.org
Wed Apr 27 00:32:35 UTC 2011
Author: jkim
Date: Wed Apr 27 00:32:35 2011
New Revision: 221102
URL: http://svn.freebsd.org/changeset/base/221102
Log:
Use ACPI-supplied CPU frequencies instead of estimated ones as we are about
to use other values from the same table anyway.
MFC after: 3 days
Modified:
head/sys/x86/cpufreq/powernow.c
Modified: head/sys/x86/cpufreq/powernow.c
==============================================================================
--- head/sys/x86/cpufreq/powernow.c Wed Apr 27 00:10:26 2011 (r221101)
+++ head/sys/x86/cpufreq/powernow.c Wed Apr 27 00:32:35 2011 (r221102)
@@ -801,15 +801,13 @@ pn_decode_acpi(device_t dev, device_t pe
if ((sc->errata & A0_ERRATA) &&
(pn7_fid_to_mult[state.fid] % 10) == 5)
continue;
- state.freq = 100 * pn7_fid_to_mult[state.fid] * sc->fsb;
break;
case PN8_TYPE:
state.fid = ACPI_PN8_CTRL_TO_FID(ctrl);
state.vid = ACPI_PN8_CTRL_TO_VID(ctrl);
- state.freq = 100 * pn8_fid_to_mult[state.fid] * sc->fsb;
break;
}
-
+ state.freq = sets[i].freq * 1000;
state.power = sets[i].power;
j = n;
@@ -841,6 +839,7 @@ pn_decode_acpi(device_t dev, device_t pe
device_printf(dev, "ACPI MAX frequency not found\n");
return (EINVAL);
}
+ sc->fsb = state.freq / 100 / pn7_fid_to_mult[state.fid];
break;
case PN8_TYPE:
sc->vst = ACPI_PN8_CTRL_TO_VST(ctrl),
@@ -856,6 +855,7 @@ pn_decode_acpi(device_t dev, device_t pe
if (sc->powernow_max_states >= 2 &&
(sc->powernow_states[sc->powernow_max_states - 2].fid < 8))
return (EINVAL);
+ sc->fsb = state.freq / 100 / pn8_fid_to_mult[state.fid];
break;
}
More information about the svn-src-all
mailing list