diff mbox series

[3/9] cpuidle-haltpoll: condition on ARCH_CPUIDLE_HALTPOLL

Message ID 20240430183730.561960-4-ankur.a.arora@oracle.com
State New
Headers show
Series Enable haltpoll for arm64 | expand

Commit Message

Ankur Arora April 30, 2024, 6:37 p.m. UTC
The cpuidle-haltpoll driver and its namesake governor are selected
under KVM_GUEST on X86. In addition, KVM_GUEST also selects
ARCH_CPUIDLE_HALTPOLL and defines the requisite
arch_haltpoll_{enable,disable}() functions.

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

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

Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
---
 drivers/cpuidle/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Joao Martins May 22, 2024, 4:09 p.m. UTC | #1
On 30/04/2024 19:37, Ankur Arora wrote:
> diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
> index 75f6e176bbc8..c1bebadf22bc 100644
> --- a/drivers/cpuidle/Kconfig
> +++ b/drivers/cpuidle/Kconfig
> @@ -72,8 +71,8 @@ source "drivers/cpuidle/Kconfig.riscv"
>  endmenu
>  
>  config HALTPOLL_CPUIDLE
> -	tristate "Halt poll cpuidle driver"
> -	depends on X86 && KVM_GUEST && ARCH_HAS_OPTIMIZED_POLL
> +	tristate "Haltpoll cpuidle driver"
> +	depends on ARCH_CPUIDLE_HALTPOLL && ARCH_HAS_OPTIMIZED_POLL
>  	select CPU_IDLE_GOV_HALTPOLL
>  	default y
>  	help

I suspect the drop on KVM_GUEST is causing the kbuild robot as it's
arch/x86/kernel/kvm.c that ends up including the arch haltpoll definitions.
diff mbox series

Patch

diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index 75f6e176bbc8..c1bebadf22bc 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -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
@@ -72,8 +71,8 @@  source "drivers/cpuidle/Kconfig.riscv"
 endmenu
 
 config HALTPOLL_CPUIDLE
-	tristate "Halt poll cpuidle driver"
-	depends on X86 && KVM_GUEST && ARCH_HAS_OPTIMIZED_POLL
+	tristate "Haltpoll cpuidle driver"
+	depends on ARCH_CPUIDLE_HALTPOLL && ARCH_HAS_OPTIMIZED_POLL
 	select CPU_IDLE_GOV_HALTPOLL
 	default y
 	help