diff mbox series

[v4,6/8] cpuidle-haltpoll: ARM64 support

Message ID 1707982910-27680-7-git-send-email-mihai.carabas@oracle.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/8] x86: Move ARCH_HAS_CPU_RELAX to arch | expand

Commit Message

Mihai Carabas Feb. 15, 2024, 7:41 a.m. UTC
From: Joao Martins <joao.m.martins@oracle.com>

To test whether it's a guest or not for the default cases, the haltpoll
driver uses the kvm_para* helpers to find out if it's a guest or not.

ARM64 doesn't have or defined any of these, so it remains disabled on
the default. Although it allows to be force-loaded.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
---
 drivers/cpuidle/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tomohiro Misono (Fujitsu) Feb. 26, 2024, 8:30 a.m. UTC | #1
Hi,
> Subject: [PATCH v4 6/8] cpuidle-haltpoll: ARM64 support
> 
> From: Joao Martins <joao.m.martins@oracle.com>
> 
> To test whether it's a guest or not for the default cases, the haltpoll
> driver uses the kvm_para* helpers to find out if it's a guest or not.
> 
> ARM64 doesn't have or defined any of these, so it remains disabled on
> the default. Although it allows to be force-loaded.
> 
> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
> Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
> ---
>  drivers/cpuidle/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
> index cac5997dca50..067927eda466 100644
> --- a/drivers/cpuidle/Kconfig
> +++ b/drivers/cpuidle/Kconfig
> @@ -35,7 +35,7 @@ config CPU_IDLE_GOV_TEO
> 
>  config CPU_IDLE_GOV_HALTPOLL
>  	bool "Haltpoll governor (for virtualized systems)"
> -	depends on KVM_GUEST
> +	depends on (X86 && KVM_GUEST) || ARM64
>  	help
>  	  This governor implements haltpoll idle state selection, to be
>  	  used in conjunction with the haltpoll cpuidle driver, allowing
> @@ -73,7 +73,7 @@ endmenu
> 
>  config HALTPOLL_CPUIDLE
>  	tristate "Halt poll cpuidle driver"

I noticed that to build as a module, arch_cpu_idle needs to
be exported in arch/arm64/kernel/idle.c like x86.

Regards,
Tomohiro

> -	depends on X86 && KVM_GUEST
> +	depends on (X86 && KVM_GUEST) || ARM64
>  	select CPU_IDLE_GOV_HALTPOLL
>  	default y
>  	help
> --
> 1.8.3.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox series

Patch

diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index cac5997dca50..067927eda466 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -35,7 +35,7 @@  config CPU_IDLE_GOV_TEO
 
 config CPU_IDLE_GOV_HALTPOLL
 	bool "Haltpoll governor (for virtualized systems)"
-	depends on KVM_GUEST
+	depends on (X86 && KVM_GUEST) || ARM64
 	help
 	  This governor implements haltpoll idle state selection, to be
 	  used in conjunction with the haltpoll cpuidle driver, allowing
@@ -73,7 +73,7 @@  endmenu
 
 config HALTPOLL_CPUIDLE
 	tristate "Halt poll cpuidle driver"
-	depends on X86 && KVM_GUEST
+	depends on (X86 && KVM_GUEST) || ARM64
 	select CPU_IDLE_GOV_HALTPOLL
 	default y
 	help