提交 86e13684 编写于 作者: T Thomas Renninger 提交者: Dave Jones

[CPUFREQ] powernow-k8: Set transition latency to 1 if ACPI tables export 0

This doesn't fix anything, but it's expected that a transition latency of 0
could cause trouble in the future.
Signed-off-by: NThomas Renninger <trenn@suse.de>
Cc: Langsdorf, Mark <mark.langsdorf@amd.com>
Signed-off-by: NDave Jones <davej@redhat.com>
上级 cef9615a
...@@ -1046,6 +1046,19 @@ static int get_transition_latency(struct powernow_k8_data *data) ...@@ -1046,6 +1046,19 @@ static int get_transition_latency(struct powernow_k8_data *data)
if (cur_latency > max_latency) if (cur_latency > max_latency)
max_latency = cur_latency; max_latency = cur_latency;
} }
if (max_latency == 0) {
/*
* Fam 11h always returns 0 as transition latency.
* This is intended and means "very fast". While cpufreq core
* and governors currently can handle that gracefully, better
* set it to 1 to avoid problems in the future.
* For all others it's a BIOS bug.
*/
if (!boot_cpu_data.x86 == 0x11)
printk(KERN_ERR FW_WARN PFX "Invalid zero transition "
"latency\n");
max_latency = 1;
}
/* value in usecs, needs to be in nanoseconds */ /* value in usecs, needs to be in nanoseconds */
return 1000 * max_latency; return 1000 * max_latency;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册