All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: Fix hyp_cpu_pm_{init,exit} __init annotation
@ 2020-12-23 12:08 ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2020-12-23 12:08 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm; +Cc: kernel-team

The __init annotations on hyp_cpu_pm_{init,exit} are obviously incorrect,
and the build system shouts at you if you enable DEBUG_SECTION_MISMATCH.

Nothing really bad happens as we never execute that code outside of the
init context, but we can't label the callers as __int either, as kvm_init
isn't __init itself. Oh well.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 arch/arm64/kvm/arm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 6e637d2b4cfb..71a49eae9ea0 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1574,12 +1574,12 @@ static struct notifier_block hyp_init_cpu_pm_nb = {
 	.notifier_call = hyp_init_cpu_pm_notifier,
 };
 
-static void __init hyp_cpu_pm_init(void)
+static void hyp_cpu_pm_init(void)
 {
 	if (!is_protected_kvm_enabled())
 		cpu_pm_register_notifier(&hyp_init_cpu_pm_nb);
 }
-static void __init hyp_cpu_pm_exit(void)
+static void hyp_cpu_pm_exit(void)
 {
 	if (!is_protected_kvm_enabled())
 		cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);
-- 
2.29.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] KVM: arm64: Fix hyp_cpu_pm_{init,exit} __init annotation
@ 2020-12-23 12:08 ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2020-12-23 12:08 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm
  Cc: Alexandru Elisei, kernel-team, James Morse, Julien Thierry,
	Suzuki K Poulose

The __init annotations on hyp_cpu_pm_{init,exit} are obviously incorrect,
and the build system shouts at you if you enable DEBUG_SECTION_MISMATCH.

Nothing really bad happens as we never execute that code outside of the
init context, but we can't label the callers as __int either, as kvm_init
isn't __init itself. Oh well.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 arch/arm64/kvm/arm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 6e637d2b4cfb..71a49eae9ea0 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1574,12 +1574,12 @@ static struct notifier_block hyp_init_cpu_pm_nb = {
 	.notifier_call = hyp_init_cpu_pm_notifier,
 };
 
-static void __init hyp_cpu_pm_init(void)
+static void hyp_cpu_pm_init(void)
 {
 	if (!is_protected_kvm_enabled())
 		cpu_pm_register_notifier(&hyp_init_cpu_pm_nb);
 }
-static void __init hyp_cpu_pm_exit(void)
+static void hyp_cpu_pm_exit(void)
 {
 	if (!is_protected_kvm_enabled())
 		cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: arm64: Fix hyp_cpu_pm_{init,exit} __init annotation
  2020-12-23 12:08 ` Marc Zyngier
@ 2020-12-29 22:34   ` Nathan Chancellor
  -1 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2020-12-29 22:34 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: kernel-team, kvmarm, linux-arm-kernel

On Wed, Dec 23, 2020 at 12:08:54PM +0000, Marc Zyngier wrote:
> The __init annotations on hyp_cpu_pm_{init,exit} are obviously incorrect,
> and the build system shouts at you if you enable DEBUG_SECTION_MISMATCH.
> 
> Nothing really bad happens as we never execute that code outside of the
> init context, but we can't label the callers as __int either, as kvm_init
> isn't __init itself. Oh well.
> 
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
>  arch/arm64/kvm/arm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 6e637d2b4cfb..71a49eae9ea0 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -1574,12 +1574,12 @@ static struct notifier_block hyp_init_cpu_pm_nb = {
>  	.notifier_call = hyp_init_cpu_pm_notifier,
>  };
>  
> -static void __init hyp_cpu_pm_init(void)
> +static void hyp_cpu_pm_init(void)
>  {
>  	if (!is_protected_kvm_enabled())
>  		cpu_pm_register_notifier(&hyp_init_cpu_pm_nb);
>  }
> -static void __init hyp_cpu_pm_exit(void)
> +static void hyp_cpu_pm_exit(void)
>  {
>  	if (!is_protected_kvm_enabled())
>  		cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);
> -- 
> 2.29.2
> 
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: arm64: Fix hyp_cpu_pm_{init,exit} __init annotation
@ 2020-12-29 22:34   ` Nathan Chancellor
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2020-12-29 22:34 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: kernel-team, kvmarm, linux-arm-kernel

On Wed, Dec 23, 2020 at 12:08:54PM +0000, Marc Zyngier wrote:
> The __init annotations on hyp_cpu_pm_{init,exit} are obviously incorrect,
> and the build system shouts at you if you enable DEBUG_SECTION_MISMATCH.
> 
> Nothing really bad happens as we never execute that code outside of the
> init context, but we can't label the callers as __int either, as kvm_init
> isn't __init itself. Oh well.
> 
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
>  arch/arm64/kvm/arm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 6e637d2b4cfb..71a49eae9ea0 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -1574,12 +1574,12 @@ static struct notifier_block hyp_init_cpu_pm_nb = {
>  	.notifier_call = hyp_init_cpu_pm_notifier,
>  };
>  
> -static void __init hyp_cpu_pm_init(void)
> +static void hyp_cpu_pm_init(void)
>  {
>  	if (!is_protected_kvm_enabled())
>  		cpu_pm_register_notifier(&hyp_init_cpu_pm_nb);
>  }
> -static void __init hyp_cpu_pm_exit(void)
> +static void hyp_cpu_pm_exit(void)
>  {
>  	if (!is_protected_kvm_enabled())
>  		cpu_pm_unregister_notifier(&hyp_init_cpu_pm_nb);
> -- 
> 2.29.2
> 
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-30  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 12:08 [PATCH] KVM: arm64: Fix hyp_cpu_pm_{init,exit} __init annotation Marc Zyngier
2020-12-23 12:08 ` Marc Zyngier
2020-12-29 22:34 ` Nathan Chancellor
2020-12-29 22:34   ` Nathan Chancellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.