Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2015 12:45:26 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277318 - head/sys/dev/acpica
Message-ID:  <201501181245.t0ICjQjG013768@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sun Jan 18 12:45:26 2015
New Revision: 277318
URL: https://svnweb.freebsd.org/changeset/base/277318

Log:
  When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't
  accidentally enable non-existent states.
  
  This bug was triggered if ACPI advertises the presence of a C2 state
  which we fail to parse via acpi_PkgGas due to our lack of support for
  FFixedHW resources, and causes an immediate panic when an attempt is
  made to enter the (NULL) state.
  
  One affected platform is the EC2 c4.8xlarge VM instance type; there
  may be others.
  
  MFC after:	1 week
  Thanks to:	jkim, @_msw_

Modified:
  head/sys/dev/acpica/acpi_cpu.c

Modified: head/sys/dev/acpica/acpi_cpu.c
==============================================================================
--- head/sys/dev/acpica/acpi_cpu.c	Sun Jan 18 11:54:20 2015	(r277317)
+++ head/sys/dev/acpica/acpi_cpu.c	Sun Jan 18 12:45:26 2015	(r277318)
@@ -885,7 +885,7 @@ acpi_cpu_startup(void *arg)
 	for (i = 0; i < cpu_ndevices; i++) {
 	    sc = device_get_softc(cpu_devices[i]);
 	    if (cpu_quirks & CPU_QUIRK_NO_C3) {
-		sc->cpu_cx_count = sc->cpu_non_c3 + 1;
+		sc->cpu_cx_count = min(sc->cpu_cx_count, sc->cpu_non_c3 + 1);
 	    }
 	    AcpiInstallNotifyHandler(sc->cpu_handle, ACPI_DEVICE_NOTIFY,
 		acpi_cpu_notify, sc);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501181245.t0ICjQjG013768>