summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/acpi/cstate.c
diff options
context:
space:
mode:
authorPu Wen <puwen@hygon.cn>2021-05-28 16:14:17 +0800
committerBorislav Petkov <bp@suse.de>2021-05-31 10:47:04 +0200
commit280b68a3b3b96b027fcdeb5a3916a8e2aaf84d03 (patch)
treef0551ee66c2e8d36b807f1547dc0ee40295f39bc /arch/x86/kernel/acpi/cstate.c
parent2ade8fc65076095460e3ea1ca65a8f619d7d9a3a (diff)
x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems
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: Pu Wen <puwen@hygon.cn> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210528081417.31474-1-puwen@hygon.cn
Diffstat (limited to 'arch/x86/kernel/acpi/cstate.c')
-rw-r--r--arch/x86/kernel/acpi/cstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index 49ae4e1ac9cd..7de599eba7f0 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -197,7 +197,8 @@ static int __init ffh_cstate_init(void)
struct cpuinfo_x86 *c = &boot_cpu_data;
if (c->x86_vendor != X86_VENDOR_INTEL &&
- c->x86_vendor != X86_VENDOR_AMD)
+ c->x86_vendor != X86_VENDOR_AMD &&
+ c->x86_vendor != X86_VENDOR_HYGON)
return -1;
cpu_cstate_entry = alloc_percpu(struct cstate_entry);