Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2015 08:16:52 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r277692 - stable/10/sys/dev/acpica
Message-ID:  <201501250816.t0P8GqsK018000@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sun Jan 25 08:16:51 2015
New Revision: 277692
URL: https://svnweb.freebsd.org/changeset/base/277692

Log:
  MFC r277318:
    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.

Modified:
  stable/10/sys/dev/acpica/acpi_cpu.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/acpica/acpi_cpu.c
==============================================================================
--- stable/10/sys/dev/acpica/acpi_cpu.c	Sun Jan 25 06:05:55 2015	(r277691)
+++ stable/10/sys/dev/acpica/acpi_cpu.c	Sun Jan 25 08:16:51 2015	(r277692)
@@ -872,7 +872,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?201501250816.t0P8GqsK018000>