From owner-freebsd-current@FreeBSD.ORG Fri Dec 12 00:00:06 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2048B16A4CE for ; Fri, 12 Dec 2003 00:00:06 -0800 (PST) Received: from maestro.tackymt.homeip.net (YahooBB219181148020.bbtec.net [219.181.148.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3C3043D39 for ; Fri, 12 Dec 2003 00:00:00 -0800 (PST) (envelope-from taku@cent.saitama-u.ac.jp) Received: from YahooBB219181148020.bbtec.net (localhost [IPv6:::1]) hBC7xtn1018300; Fri, 12 Dec 2003 16:59:56 +0900 (JST) (envelope-from taku@cent.saitama-u.ac.jp) Date: Fri, 12 Dec 2003 16:59:54 +0900 From: Taku YAMAMOTO To: freebsd-current@freebsd.org Message-Id: <20031212165954.20ee787f.taku@cent.saitama-u.ac.jp> In-Reply-To: <1071205662.970.21.camel@localhost> References: <20031209175230.I44055@root.org> <20031211141205.X50937@root.org> <1071205662.970.21.camel@localhost> Organization: Advanced Computer and Communication Studies Society X-Mailer: Sylpheed version 0.9.5-gtk2-20030906 (GTK+ 2.2.2; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: acpi-jp@jp.FreeBSD.org Subject: Re: [acpi-jp 2870] ACPI throttling changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 08:00:06 -0000 On Thu, 11 Dec 2003 23:07:42 -0600 Ryan Sommers wrote: > Here are my results from testing this patch. It appears as though the > stepping "works" for the first step and not again. However, the first > step shows a approx. 20% increase, I was expecting something closer to > 12.5%. I think we need (CPU_MAX_SPEED-1) instead of CPU_MAX_SPEED when calculating mask value (in acpi_cpu_throttle_set()): --- src/sys/dev/acpica/acpi_cpu.c.orig Fri Nov 28 01:32:46 2003 +++ src/sys/dev/acpica/acpi_cpu.c Sat Nov 29 20:41:28 2003 @@ -780,7 +780,7 @@ /* If we're at maximum speed, that's all */ if (speed < CPU_MAX_SPEED) { /* Mask the old CLK_VAL off and or-in the new value */ - clk_val = CPU_MAX_SPEED << cpu_duty_offset; + clk_val = (CPU_MAX_SPEED - 1) << cpu_duty_offset; p_cnt &= ~clk_val; p_cnt |= (speed << cpu_duty_offset); regards, Taku -- -|-__ YAMAMOTO, Taku | __ <