Date: Thu, 26 Mar 2009 21:10:36 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190454 - head/sys/dev/acpica Message-ID: <200903262110.n2QLAbHD037615@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903262110.n2QLAbHD037615>