Date: Mon, 30 Mar 2009 18:38:03 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r190567 - in stable/6/sys: . contrib/pf dev/acpica dev/cxgb Message-ID: <200903301838.n2UIc3re074847@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Mar 30 18:38:03 2009 New Revision: 190567 URL: http://svn.freebsd.org/changeset/base/190567 Log: MFC: 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. Modified: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/acpica/acpi_cpu.c stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/6/sys/dev/acpica/acpi_cpu.c Mon Mar 30 18:33:04 2009 (r190566) +++ stable/6/sys/dev/acpica/acpi_cpu.c Mon Mar 30 18:38:03 2009 (r190567) @@ -608,10 +608,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; } /* @@ -751,6 +747,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?200903301838.n2UIc3re074847>