Skip to content

Commit 280b68a

Browse files
Pu Wensuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 2ade8fc commit 280b68a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kernel/acpi/cstate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ static int __init ffh_cstate_init(void)
197197
struct cpuinfo_x86 *c = &boot_cpu_data;
198198

199199
if (c->x86_vendor != X86_VENDOR_INTEL &&
200-
c->x86_vendor != X86_VENDOR_AMD)
200+
c->x86_vendor != X86_VENDOR_AMD &&
201+
c->x86_vendor != X86_VENDOR_HYGON)
201202
return -1;
202203

203204
cpu_cstate_entry = alloc_percpu(struct cstate_entry);

0 commit comments

Comments
 (0)