]> Gentwo Git Trees - linux/.git/commitdiff
cpuidle-haltpoll: condition on ARCH_CPUIDLE_HALTPOLL
authorAnkur Arora <ankur.a.arora@oracle.com>
Wed, 25 Sep 2024 23:24:20 +0000 (16:24 -0700)
committerChristoph Lameter <cl@gentwo.org>
Wed, 9 Oct 2024 02:06:42 +0000 (19:06 -0700)
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: Ankur Arora <ankur.a.arora@oracle.com>
Acked-by: Will Deacon <will@kernel.org>
Tested-by: Misono Tomohiro <misono.tomohiro@fujitsu.com>
arch/x86/Kconfig
drivers/cpuidle/Kconfig

index 272ec653a8cd3ab57e1ee646aba0d6fbb411126d..cd457400eaf6b87b22d4dc0d69ac4f12f0cbcda7 100644 (file)
@@ -844,6 +844,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.
index 75f6e176bbc8fb41b58365edc201709178a946b1..c1bebadf22bcf6fd2243b85e8b42dc670816f393 100644 (file)
@@ -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