Date: Fri, 12 Dec 2003 11:43:05 -0800 (PST) From: Nate Lawson <nate@root.org> To: acpi-jp@jp.FreeBSD.org Cc: freebsd-current@freebsd.org Subject: Re: [acpi-jp 2888] Re: ACPI throttling changes Message-ID: <20031212114245.P53627@root.org> In-Reply-To: <20031212165954.20ee787f.taku@cent.saitama-u.ac.jp> References: <20031209175230.I44055@root.org> <20031211141205.X50937@root.org> <20031212165954.20ee787f.taku@cent.saitama-u.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 12 Dec 2003, Taku YAMAMOTO wrote: > On Thu, 11 Dec 2003 23:07:42 -0600 > Ryan Sommers <ryans@gamersimpact.com> 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); Thanks, this was the problem. I've committed the fix. -Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031212114245.P53627>