From 949978bef21f95950bad7cc07b247edb27151f82 Mon Sep 17 00:00:00 2001 From: yuehongwu Date: Mon, 14 Oct 2024 19:57:31 +0800 Subject: [PATCH] x86: NOMWAIT HLT C1 as the default idle state at hygon platform. For performance considerations, the hygon platform defaults to using HLT as the C1 state. Signed-off-by: yuehognwu yuehongwu@tencent.com Reviewed-by: caelli caelli@tencent.com Signed-off-by: Jianping Liu --- arch/x86/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index cbb7dc1e3142..c28587deda8d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -822,6 +822,9 @@ void __init setup_arch(char **cmdline_p) */ x86_configure_nx(); + if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) + boot_option_idle_override = IDLE_NOMWAIT; + parse_early_param(); if (efi_enabled(EFI_BOOT))