svn commit: r222148 - stable/8/sys/x86/cpufreq
Jung-uk Kim
jkim at FreeBSD.org
Fri May 20 22:09:40 UTC 2011
Author: jkim
Date: Fri May 20 22:09:40 2011
New Revision: 222148
URL: http://svn.freebsd.org/changeset/base/222148
Log:
MFC: r221102
Use ACPI-supplied CPU frequencies instead of estimated ones.
Modified:
stable/8/sys/x86/cpufreq/powernow.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/x86/cpufreq/powernow.c
==============================================================================
--- stable/8/sys/x86/cpufreq/powernow.c Fri May 20 20:31:36 2011 (r222147)
+++ stable/8/sys/x86/cpufreq/powernow.c Fri May 20 22:09:40 2011 (r222148)
@@ -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