From owner-freebsd-acpi@FreeBSD.ORG Thu Mar 26 17:50:05 2009 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E2A81065673 for ; Thu, 26 Mar 2009 17:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE138FC15 for ; Thu, 26 Mar 2009 17:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2QHo45u007677 for ; Thu, 26 Mar 2009 17:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2QHo41h007676; Thu, 26 Mar 2009 17:50:04 GMT (envelope-from gnats) Date: Thu, 26 Mar 2009 17:50:04 GMT Message-Id: <200903261750.n2QHo41h007676@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/108581: [sysctl] sysctl: hw.acpi.cpu.cx_lowest: Invalid argument X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2009 17:50:05 -0000 The following reply was made to PR kern/108581; it has been noted by GNATS. From: Andriy Gapon To: Bruce Cran Cc: bug-followup@FreeBSD.org, lars.stokholm@gmail.com Subject: Re: kern/108581: [sysctl] sysctl: hw.acpi.cpu.cx_lowest: Invalid argument Date: Thu, 26 Mar 2009 19:46:56 +0200 on 26/03/2009 17:29 John Baldwin said the following: > I would rather move the cpu_cx_count code out into acpi_cpu_startup() > completely. It would more closely match the _CST code in that case. It is > also easier to follow the logic this way as well as it is only modified in > one place and not via a secret side-effect. Just in case: Bruce, Lars, could you please test John's patch (verbatim) and report back? Thank you! > --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_cpu.c 2009/02/19 14:40:18 > +++ //depot/user/jhb/acpipci/dev/acpica/acpi_cpu.c 2009/03/26 15:28:32 > @@ -609,10 +609,6 @@ > 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 @@ > 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; > } > > /* > > -- Andriy Gapon