[stable 9] broken hwpstate calls
Gen O.
annona2 at gmail.com
Sat May 26 06:21:18 UTC 2012
Hi,
I suprised that followings , cited from AMD BKDG(42301 Rev 3.06 - January 25, 2012)
> 2.5.2.1.4
> Core P-state Visibility
> (snip)
> If a compute unit is in a boosted P-state, MSRC001_0063[CurPstate]
> reads back as 0.
^^^^^^^^^^^^^
if in a boosted P-state, MSRC001_0063 "reads back as 0".
so here is ugly patch ;-)
--- hwpstate.c.orig 2012-05-26 15:06:06.000000000 +0900
+++ hwpstate.c 2012-05-26 15:07:50.000000000 +0900
@@ -196,7 +196,7 @@
msr = rdmsr(MSR_AMD_10H_11H_STATUS);
HWPSTATE_DEBUG(dev, "result P%d-state on cpu%d\n",
(int)msr, PCPU_GET(cpuid));
- if (msr != id) {
+ if (msr != id && msr != 0) {
HWPSTATE_DEBUG(dev, "error: loop is not enough.\n");
error = ENXIO;
}
but this doesn't reflect that the cpu frequency is equal to sysctl value.
So, disabling the boost and setting the p-state is an answer.
And when setting the max freq from sysctl, enable the boost is also.
--
Gen O.<annona2 at gmail.com>
More information about the freebsd-stable
mailing list