From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 20:57:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9614310656C7; Wed, 21 Jan 2009 20:57:54 +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 8282F8FC18; Wed, 21 Jan 2009 20:57:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LKvsdM091157; Wed, 21 Jan 2009 20:57:54 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LKvsSP091156; Wed, 21 Jan 2009 20:57:54 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212057.n0LKvsSP091156@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 20:57:54 +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: r187569 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb i386/cpufreq X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 20:57:56 -0000 Author: jkim Date: Wed Jan 21 20:57:54 2009 New Revision: 187569 URL: http://svn.freebsd.org/changeset/base/187569 Log: MFC: Use power management information for AMD CPUs from identcpu.c. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/cpufreq/powernow.c Modified: stable/7/sys/i386/cpufreq/powernow.c ============================================================================== --- stable/7/sys/i386/cpufreq/powernow.c Wed Jan 21 20:57:28 2009 (r187568) +++ stable/7/sys/i386/cpufreq/powernow.c Wed Jan 21 20:57:54 2009 (r187569) @@ -758,22 +758,6 @@ pn_decode_pst(device_t dev) return (ENODEV); } -/* - * TODO: this should be done in sys/ARCH/ARCH/identcpu.c - */ -static int -cpu_is_powernow_capable(void) -{ - u_int regs[4]; - - if (strcmp(cpu_vendor, "AuthenticAMD") != 0 || - cpu_exthigh < 0x80000007) - return (FALSE); - - do_cpuid(0x80000007, regs); - return (regs[3] & 0x6); -} - static int pn_decode_acpi(device_t dev, device_t perf_dev) { @@ -883,7 +867,7 @@ pn_identify(driver_t *driver, device_t p { device_t child; - if (cpu_is_powernow_capable() == 0) + if ((amd_pminfo & (AMDPM_FID | AMDPM_VID)) == 0) return; switch (cpu_id & 0xf00) { case 0x600: