未验证 提交 93ad695d 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!433 [openEuler-1.0-LTS] Add support of turbo boost control interface for Zhaoxin CPUs

Merge Pull Request from: @leoliu-oc 
 
For recent Zhaoxin platforms, the turbo boost can be dynamically enabled or disabled,
so add boost control interface support for Zhaoxin CPUs when acpi_cpufreq driver is in use.

Issue
https://gitee.com/openeuler/kernel/issues/I6J28W

Test
N/A

Knowe Issue
N/A

Default config change
N/A 
 
Link:https://gitee.com/openeuler/kernel/pulls/433 

Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> 
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> 
......@@ -94,6 +94,8 @@ static bool boost_state(unsigned int cpu)
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_INTEL:
case X86_VENDOR_CENTAUR:
case X86_VENDOR_ZHAOXIN:
rdmsr_on_cpu(cpu, MSR_IA32_MISC_ENABLE, &lo, &hi);
msr = lo | ((u64)hi << 32);
return !(msr & MSR_IA32_MISC_ENABLE_TURBO_DISABLE);
......@@ -113,6 +115,8 @@ static int boost_set_msr(bool enable)
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_INTEL:
case X86_VENDOR_CENTAUR:
case X86_VENDOR_ZHAOXIN:
msr_addr = MSR_IA32_MISC_ENABLE;
msr_mask = MSR_IA32_MISC_ENABLE_TURBO_DISABLE;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册