Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2011 22:20:24 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r222149 - stable/7/sys/i386/cpufreq
Message-ID:  <201105202220.p4KMKO74003040@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri May 20 22:20:23 2011
New Revision: 222149
URL: http://svn.freebsd.org/changeset/base/222149

Log:
  MFC:	r221102
  
  Use ACPI-supplied CPU frequencies instead of estimated ones.

Modified:
  stable/7/sys/i386/cpufreq/powernow.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/i386/cpufreq/powernow.c
==============================================================================
--- stable/7/sys/i386/cpufreq/powernow.c	Fri May 20 22:09:40 2011	(r222148)
+++ stable/7/sys/i386/cpufreq/powernow.c	Fri May 20 22:20:23 2011	(r222149)
@@ -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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105202220.p4KMKO74003040>