Skip to content

Commit

Permalink
KVM: powerpc: fix some init/exit annotations
Browse files Browse the repository at this point in the history
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: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Stephen Rothwell authored and Avi Kivity committed Sep 10, 2009
1 parent 6c8166a commit 2986b8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/kvm/44x.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
kmem_cache_free(kvm_vcpu_cache, vcpu_44x);
}

static int kvmppc_44x_init(void)
static int __init kvmppc_44x_init(void)
{
int r;

Expand All @@ -149,7 +149,7 @@ static int kvmppc_44x_init(void)
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();
}
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
return kvmppc_core_vcpu_translate(vcpu, tr);
}

int kvmppc_booke_init(void)
int __init kvmppc_booke_init(void)
{
unsigned long ivor[16];
unsigned long max_ivor = 0;
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kvm/e500.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
kmem_cache_free(kvm_vcpu_cache, vcpu_e500);
}

static int kvmppc_e500_init(void)
static int __init kvmppc_e500_init(void)
{
int r, i;
unsigned long ivor[3];
Expand Down Expand Up @@ -160,7 +160,7 @@ static int kvmppc_e500_init(void)
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();
}
Expand Down

0 comments on commit 2986b8c

Please sign in to comment.