From owner-svn-src-stable-7@FreeBSD.ORG Fri May 20 22:20:24 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50A31106564A; Fri, 20 May 2011 22:20:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40BB78FC15; Fri, 20 May 2011 22:20:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4KMKO4r003042; Fri, 20 May 2011 22:20:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4KMKO74003040; Fri, 20 May 2011 22:20:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201105202220.p4KMKO74003040@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 20 May 2011 22:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222149 - stable/7/sys/i386/cpufreq X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2011 22:20:24 -0000 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; }