Commit 2986b8c7 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Avi Kivity

KVM: powerpc: fix some init/exit annotations

Fixes a couple of warnings like this one:

WARNING: arch/powerpc/kvm/kvm-440.o(.text+0x1e8c): Section mismatch in reference from the function kvmppc_44x_exit() to the function .exit.text:kvmppc_booke_exit()
The function kvmppc_44x_exit() references a function in an exit section.
Often the function kvmppc_booke_exit() has valid usage outside the exit section
and the fix is to remove the __exit annotation of kvmppc_booke_exit.

Also add some __init annotations on obvious routines.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 6c8166a7
...@@ -138,7 +138,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu) ...@@ -138,7 +138,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
kmem_cache_free(kvm_vcpu_cache, vcpu_44x); kmem_cache_free(kvm_vcpu_cache, vcpu_44x);
} }
static int kvmppc_44x_init(void) static int __init kvmppc_44x_init(void)
{ {
int r; int r;
...@@ -149,7 +149,7 @@ static int kvmppc_44x_init(void) ...@@ -149,7 +149,7 @@ static int kvmppc_44x_init(void)
return kvm_init(NULL, sizeof(struct kvmppc_vcpu_44x), THIS_MODULE); return kvm_init(NULL, sizeof(struct kvmppc_vcpu_44x), THIS_MODULE);
} }
static void kvmppc_44x_exit(void) static void __exit kvmppc_44x_exit(void)
{ {
kvmppc_booke_exit(); kvmppc_booke_exit();
} }
......
...@@ -520,7 +520,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, ...@@ -520,7 +520,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
return kvmppc_core_vcpu_translate(vcpu, tr); return kvmppc_core_vcpu_translate(vcpu, tr);
} }
int kvmppc_booke_init(void) int __init kvmppc_booke_init(void)
{ {
unsigned long ivor[16]; unsigned long ivor[16];
unsigned long max_ivor = 0; unsigned long max_ivor = 0;
......
...@@ -132,7 +132,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu) ...@@ -132,7 +132,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
kmem_cache_free(kvm_vcpu_cache, vcpu_e500); kmem_cache_free(kvm_vcpu_cache, vcpu_e500);
} }
static int kvmppc_e500_init(void) static int __init kvmppc_e500_init(void)
{ {
int r, i; int r, i;
unsigned long ivor[3]; unsigned long ivor[3];
...@@ -160,7 +160,7 @@ static int kvmppc_e500_init(void) ...@@ -160,7 +160,7 @@ static int kvmppc_e500_init(void)
return kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), THIS_MODULE); return kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), THIS_MODULE);
} }
static void kvmppc_e500_exit(void) static void __init kvmppc_e500_exit(void)
{ {
kvmppc_booke_exit(); kvmppc_booke_exit();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment