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