svn commit: r190454 - head/sys/dev/acpica

John Baldwin jhb at FreeBSD.org
Thu Mar 26 14:10:38 PDT 2009


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


More information about the svn-src-all mailing list