From owner-freebsd-acpi@FreeBSD.ORG Sat Feb 16 02:01:26 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AA1516A419 for ; Sat, 16 Feb 2008 02:01:25 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id 4BEDB13C45E for ; Sat, 16 Feb 2008 02:01:24 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so15419uge.37 for ; Fri, 15 Feb 2008 18:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=dzRQAowCa221L3u0YiftLcJhnI24ais8xfXpSbGdDg8=; b=Yh2Y8IvckmRikt0WAwo2tzrnOuhgEHy7X/YcMNDMOc2TiEC3onnzCxyTz1sJ0t+g0iwDAJ4f4AIcG9AEz69IzEkTeZijuWtzomZFxqaUzJksgd0qy8L4HWKsCgWpv9eTTpC26OcSYnH9vdFMa3A0SMjy0DGn9rA0EWJuf57qoZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=tRb2T++8wNtlBZRXwQdAyfZ2fdrqKsyylIs5MhHUtl3Df65VIb8idnWsWKJkqRRiNMPC11HSk9H8S9zxqkGRVtHqgYmihrToqXRhR9yQcumM7NLZg7+C7JeEBwIWqogbNh8+UYT/m7vARwmdO7iDTV5p0T+lZJm6BNWalNTUZA4= Received: by 10.67.15.15 with SMTP id s15mr120572ugi.27.1203127283555; Fri, 15 Feb 2008 18:01:23 -0800 (PST) Received: from ?89.214.218.116? ( [89.214.218.116]) by mx.google.com with ESMTPS id 39sm85862ugb.15.2008.02.15.18.01.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Feb 2008 18:01:22 -0800 (PST) Message-Id: From: Rui Paulo To: Nate Lawson In-Reply-To: <47B62044.50808@root.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sat, 16 Feb 2008 02:01:20 +0000 References: <479F0ED4.9030709@icyb.net.ua> <479F62D9.6080703@root.org> <47A34360.2030105@icyb.net.ua> <47B0BF20.6020906@icyb.net.ua> <47B3214D.2050507@icyb.net.ua> <47B40529.1040400@icyb.net.ua> <47B62044.50808@root.org> X-Mailer: Apple Mail (2.919.2) Sender: Rui Paulo Cc: freebsd-acpi@freebsd.org, Andriy Gapon Subject: Re: cx_lowest and CPU usage X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Feb 2008 02:01:26 -0000 On Feb 15, 2008, at 11:29 PM, Nate Lawson wrote: > > > Andriy Gapon wrote: >> on 13/02/2008 18:56 Andriy Gapon said the following: >>> on 11/02/2008 23:33 Andriy Gapon said the following: >>>> Hmm, it seems that the quirk is only honored if you actually try >>>> to use >>>> C3 state, but it doesn't exclude the state from the available >>>> states. >>>> This is OK, but seems to be a little bit non-user-friendly. >>>> >>> >>> It seems that the following code in acpi_cpu_generic_cx_probe() >>> should >>> have a check for the quirk (for C3 to not be present in the >>> available >>> states): >>> >>> /* Validate and allocate resources for C3 (P_LVL3). */ >>> if (AcpiGbl_FADT->Plvl3Lat <= 1000) { >>> gas.Address = sc->cpu_p_blk + 5; >>> acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc- >>> >cpu_rid, &gas, >>> &cx_ptr->p_lvlx, RF_SHAREABLE); >>> if (cx_ptr->p_lvlx != NULL) { >>> sc->cpu_rid++; >>> cx_ptr->type = ACPI_STATE_C3; >>> cx_ptr->trans_lat = AcpiGbl_FADT->Plvl3Lat; >>> cx_ptr++; >>> sc->cpu_cx_count++; >>> } >>> } >>> >>> I will test this hypothesis tonight. >>> It is definite that my system goes through this routine, because >>> DSDT >>> doesn't have _CST defined. >>> >>> >> The following patch did help to eliminate C3 from cx_supported. >> Sorry, the patch is a copy/paste, tabs lost, but the change is tiny. >> @@ -590,7 +595,7 @@ >> return; >> /* Validate and allocate resources for C3 (P_LVL3). */ >> - if (AcpiGbl_FADT.C3Latency <= 1000) { >> + if (AcpiGbl_FADT.C3Latency <= 1000 && (cpu_quirks & >> CPU_QUIRK_NO_C3) == 0) { >> gas.Address = sc->cpu_p_blk + 5; >> acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc- >> >cpu_rid, >> &gas, >> &cx_ptr->p_lvlx, RF_SHAREABLE); > > I've reviewed it, this patch is correct. I committed it. Thanks Andriy. Regards. -- Rui Paulo