Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2009 18:33:05 +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-7@freebsd.org
Subject:   svn commit: r190566 - in stable/7/sys: . contrib/pf dev/acpica dev/ath/ath_hal dev/cxgb
Message-ID:  <200903301833.n2UIX5K9074717@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon Mar 30 18:33:04 2009
New Revision: 190566
URL: http://svn.freebsd.org/changeset/base/190566

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.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/acpica/acpi_cpu.c
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/acpica/acpi_cpu.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_cpu.c	Mon Mar 30 18:01:42 2009	(r190565)
+++ stable/7/sys/dev/acpica/acpi_cpu.c	Mon Mar 30 18:33:04 2009	(r190566)
@@ -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?200903301833.n2UIX5K9074717>