Commit 0f96412d authored by Ankur Arora's avatar Ankur Arora Committed by lishusen
Browse files

cpuidle-haltpoll: condition on ARCH_CPUIDLE_HALTPOLL

virt inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB7PU3


CVE: NA

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

The cpuidle-haltpoll driver and its namesake governor are selected
under KVM_GUEST on X86. KVM_GUEST in-turn selects ARCH_CPUIDLE_HALTPOLL
and defines the requisite arch_haltpoll_{enable,disable}() functions.

So remove the explicit dependence of HALTPOLL_CPUIDLE on KVM_GUEST,
and instead use ARCH_CPUIDLE_HALTPOLL as proxy for architectural
support for haltpoll.

Also change "halt poll" to "haltpoll" in one of the summary clauses,
since the second form is used everywhere else.

Signed-off-by: default avatarAnkur Arora <ankur.a.arora@oracle.com>
Signed-off-by: default avatarlishusen <lishusen2@huawei.com>
parent 4a2759f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -839,6 +839,7 @@ config KVM_GUEST

config ARCH_CPUIDLE_HALTPOLL
	def_bool n
	depends on KVM_GUEST
	prompt "Disable host haltpoll when loading haltpoll driver"
	help
	  If virtualized under KVM, disable host haltpoll.
+2 −3
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ config CPU_IDLE_GOV_TEO

config CPU_IDLE_GOV_HALTPOLL
	bool "Haltpoll governor (for virtualized systems)"
	depends on KVM_GUEST
	help
	  This governor implements haltpoll idle state selection, to be
	  used in conjunction with the haltpoll cpuidle driver, allowing
@@ -73,7 +72,7 @@ endmenu

config HALTPOLL_CPUIDLE
	tristate "Haltpoll cpuidle driver"
	depends on X86 && KVM_GUEST && ARCH_HAS_OPTIMIZED_POLL
	depends on ARCH_CPUIDLE_HALTPOLL && ARCH_HAS_OPTIMIZED_POLL
	select CPU_IDLE_GOV_HALTPOLL
	default y
	help