anolis: cpuidle: Do not call default idle in idle=halt and haltpoll
ANBZ: #10852 There're 3 considerations: 1. In tdx scenarios, hlt instruction causes #VE exception to emulate hlt, that will make hlt in exception context which may leads to RCU grace period lag. In that case, kernel can boot very slowly 2. x86_idle could be overridden, do not set it default_idle() again 3. arch_cpu_idle() can use something like mwait. Signed-off-by: Zelin Deng <zelin.deng@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/3833
This commit is contained in:
parent
ebb84867c5
commit
3f325c5eb3
|
@ -729,6 +729,7 @@ void arch_cpu_idle(void)
|
|||
{
|
||||
x86_idle();
|
||||
}
|
||||
EXPORT_SYMBOL(arch_cpu_idle);
|
||||
|
||||
/*
|
||||
* We use this if we don't have any better idle routine..
|
||||
|
@ -952,7 +953,6 @@ static int __init idle_setup(char *str)
|
|||
* To continue to load the CPU idle driver, don't touch
|
||||
* the boot_option_idle_override.
|
||||
*/
|
||||
x86_idle = default_idle;
|
||||
boot_option_idle_override = IDLE_HALT;
|
||||
} else if (!strcmp(str, "nomwait")) {
|
||||
/*
|
||||
|
|
|
@ -32,7 +32,7 @@ static int default_enter_idle(struct cpuidle_device *dev,
|
|||
local_irq_enable();
|
||||
return index;
|
||||
}
|
||||
default_idle();
|
||||
arch_cpu_idle();
|
||||
return index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue