From owner-svn-src-all@FreeBSD.ORG Sat Jul 7 07:59:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D991106566B; Sat, 7 Jul 2012 07:59:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDD5F8FC0C; Sat, 7 Jul 2012 07:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q677xEZn028172; Sat, 7 Jul 2012 07:59:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q677xE2V028170; Sat, 7 Jul 2012 07:59:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207070759.q677xE2V028170@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 Jul 2012 07:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238192 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 07:59:15 -0000 Author: avg Date: Sat Jul 7 07:59:14 2012 New Revision: 238192 URL: http://svn.freebsd.org/changeset/base/238192 Log: acpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration cpu_cx_count is an index into accepted states, while i is an index into original _CST states MFC after: 1 week Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 05:25:22 2012 (r238191) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jul 7 07:59:14 2012 (r238192) @@ -746,13 +746,13 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s /* This is the first C1 state. Use the reserved slot. */ sc->cpu_cx_states[0] = *cx_ptr; } else { - sc->cpu_non_c3 = i; + sc->cpu_non_c3 = sc->cpu_cx_count; cx_ptr++; sc->cpu_cx_count++; } continue; case ACPI_STATE_C2: - sc->cpu_non_c3 = i; + sc->cpu_non_c3 = sc->cpu_cx_count; break; case ACPI_STATE_C3: default: