From owner-svn-src-head@FreeBSD.ORG Thu Mar 26 21:10:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C5B9106564A; Thu, 26 Mar 2009 21:10:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AB0C8FC16; Thu, 26 Mar 2009 21:10:37 +0000 (UTC) (envelope-from jhb@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 n2QLAb2N037617; Thu, 26 Mar 2009 21:10:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2QLAbHD037615; Thu, 26 Mar 2009 21:10:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200903262110.n2QLAbHD037615@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Mar 2009 21:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190454 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2009 21:10:38 -0000 Author: jhb Date: Thu Mar 26 21:10:35 2009 New Revision: 190454 URL: http://svn.freebsd.org/changeset/base/190454 Log: Move the code to update cpu_cx_count out of acpi_cpu_generic_cx_probe() and into acpi_cpu_startup() which is where all the other code to update this global variable lives. This fixes a bug where cpu_cx_count was not updated correctly if acpi_cpu_generic_cx_probe() returned early. PR: kern/108581 Debugged by: Bruce Cran Reviewed by: avg, njl, sepotvin MFC after: 3 days Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Thu Mar 26 20:23:21 2009 (r190453) +++ head/sys/dev/acpica/acpi_cpu.c Thu Mar 26 21:10:35 2009 (r190454) @@ -609,10 +609,6 @@ acpi_cpu_generic_cx_probe(struct acpi_cp sc->cpu_cx_count++; } } - - /* Update the largest cx_count seen so far */ - if (sc->cpu_cx_count > cpu_cx_count) - cpu_cx_count = sc->cpu_cx_count; } /* @@ -752,6 +748,8 @@ acpi_cpu_startup(void *arg) for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); acpi_cpu_generic_cx_probe(sc); + if (sc->cpu_cx_count > cpu_cx_count) + cpu_cx_count = sc->cpu_cx_count; } /*