svn commit: r190566 - in stable/7/sys: . contrib/pf dev/acpica dev/ath/ath_hal dev/cxgb

John Baldwin jhb at FreeBSD.org
Mon Mar 30 11:33:06 PDT 2009


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;
 	}
 
 	/*


More information about the svn-src-stable-7 mailing list