Commit 838d5d88 authored by Pu Wen's avatar Pu Wen
Browse files

x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems

mainline inclusion
from mainline-v5.14-rc1
commit 280b68a3
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7DX6V
CVE: NA

Reference: https://git.kernel.org/torvalds/c/280b68a3b3b96b027fcdeb5a3916a8e2aaf84d03



---------------------------

commit 280b68a3 upstream.

Hygon systems support the MONITOR/MWAIT instructions and these can be
used for ACPI C1 in the same way as on AMD and Intel systems.

The BIOS declares a C1 state in _CST to use FFH and CPUID_Fn00000005_EDX
is non-zero on Hygon systems.

Allow ffh_cstate_init() to succeed on Hygon systems to default using FFH
MWAIT instead of HALT for ACPI C1.

Signed-off-by: default avatarPu Wen <puwen@hygon.cn>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210528081417.31474-1-puwen@hygon.cn


[fix conflict during backport]
Signed-off-by: default avatarPu Wen <puwen@hygon.cn>
parent 8af43295
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment