linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: linux-arch@vger.kernel.org, kvm@vger.kernel.org,
	Gleb Natapov <gleb@kernel.org>, Alexander Graf <agraf@suse.de>,
	kvm-ppc@vger.kernel.org,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Paul Mackerras <paulus@samba.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init
Date: Tue, 21 Jan 2014 17:23:34 -0500	[thread overview]
Message-ID: <52DEF366.6030105@windriver.com> (raw)
In-Reply-To: <1390339396-3479-13-git-send-email-paul.gortmaker@windriver.com>

On 14-01-21 04:22 PM, Paul Gortmaker wrote:
> In powerpc, CONFIG_KVM is bool, and  so are these three subarch
> options, for the 44x and e500 variants.  This means that any
> module_exit() calls and functions used by them such as the
> kvmppc_booke_exit() are dead code.  Here we remove them.
> 
> In addition, rather than use module_init, which is just
> __initcall for non-modules, we update those as well.
> 
> Note that direct use of __initcall is discouraged, vs. one
> of the priority categorized subgroups.  As __initcall gets
> mapped onto device_initcall, our use of subsys_initcall (which
> seems to make sense for netfilter code) will thus change this

I've fixed the above --  s/netfilter/PPC KVM/

The risks of recycling commit logs...

Paul.
--

> registration from level 6-device to level 4-subsys (i.e. slightly
> earlier).
> 
> However no impact of that small difference is expected,
> since the arch independent kvm code doesn't trigger any init;
> it is the arch initcalls here which actually call kvm_init.
> 
> Cc: Gleb Natapov <gleb@kernel.org>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: kvm@vger.kernel.org
> Cc: kvm-ppc@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  arch/powerpc/include/asm/kvm_ppc.h |  1 -
>  arch/powerpc/kvm/44x.c             | 10 +---------
>  arch/powerpc/kvm/booke.c           |  6 ------
>  arch/powerpc/kvm/e500.c            | 10 +---------
>  arch/powerpc/kvm/e500mc.c          | 10 +---------
>  5 files changed, 3 insertions(+), 34 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
> index c8317fb..8466df5 100644
> --- a/arch/powerpc/include/asm/kvm_ppc.h
> +++ b/arch/powerpc/include/asm/kvm_ppc.h
> @@ -109,7 +109,6 @@ extern void kvmppc_core_flush_tlb(struct kvm_vcpu *vcpu);
>  extern int kvmppc_core_check_requests(struct kvm_vcpu *vcpu);
>  
>  extern int kvmppc_booke_init(void);
> -extern void kvmppc_booke_exit(void);
>  
>  extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
>  extern int kvmppc_kvm_pv(struct kvm_vcpu *vcpu);
> diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c
> index 93221e8..2129fc1 100644
> --- a/arch/powerpc/kvm/44x.c
> +++ b/arch/powerpc/kvm/44x.c
> @@ -222,12 +222,4 @@ static int __init kvmppc_44x_init(void)
>  err_out:
>  	return r;
>  }
> -
> -static void __exit kvmppc_44x_exit(void)
> -{
> -	kvmppc_pr_ops = NULL;
> -	kvmppc_booke_exit();
> -}
> -
> -module_init(kvmppc_44x_init);
> -module_exit(kvmppc_44x_exit);
> +subsys_initcall(kvmppc_44x_init);
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 0591e05..49dffa2 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1995,9 +1995,3 @@ int __init kvmppc_booke_init(void)
>  #endif /* !BOOKE_HV */
>  	return 0;
>  }
> -
> -void __exit kvmppc_booke_exit(void)
> -{
> -	free_pages(kvmppc_booke_handlers, VCPU_SIZE_ORDER);
> -	kvm_exit();
> -}
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 497b142..115ef12 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -564,12 +564,4 @@ static int __init kvmppc_e500_init(void)
>  err_out:
>  	return r;
>  }
> -
> -static void __exit kvmppc_e500_exit(void)
> -{
> -	kvmppc_pr_ops = NULL;
> -	kvmppc_booke_exit();
> -}
> -
> -module_init(kvmppc_e500_init);
> -module_exit(kvmppc_e500_exit);
> +subsys_initcall(kvmppc_e500_init);
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 4132cd2..612c216 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -382,12 +382,4 @@ static int __init kvmppc_e500mc_init(void)
>  err_out:
>  	return r;
>  }
> -
> -static void __exit kvmppc_e500mc_exit(void)
> -{
> -	kvmppc_pr_ops = NULL;
> -	kvmppc_booke_exit();
> -}
> -
> -module_init(kvmppc_e500mc_init);
> -module_exit(kvmppc_e500mc_exit);
> +subsys_initcall(kvmppc_e500mc_init);
> 

  reply	other threads:[~2014-01-21 22:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
2014-01-21 21:22 ` [PATCH 10/73] powerpc: use device_initcall for registering rtc devices Paul Gortmaker
2014-01-21 23:48   ` Geoff Levand
2014-01-22  2:26     ` Paul Gortmaker
2014-01-21 21:22 ` [PATCH 11/73] powerpc: book3s KVM can be modular so it should use module.h Paul Gortmaker
2014-01-21 21:22 ` [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init Paul Gortmaker
2014-01-21 22:23   ` Paul Gortmaker [this message]
2014-01-21 21:22 ` [PATCH 13/73] powerpc: use subsys_initcall for Freescale Local Bus Paul Gortmaker
2014-01-21 21:22 ` [PATCH 14/73] powerpc: don't use module_init for non-modular core hugetlb code Paul Gortmaker
2014-01-21 21:22 ` [PATCH 15/73] powerpc: don't use module_init in non-modular 83xx suspend code Paul Gortmaker
2014-01-21 21:22 ` [PATCH 39/73] powerpc: delete another unrequired instance of <linux/init.h> Paul Gortmaker
2014-01-21 21:23 ` [PATCH 66/73] drivers/macintosh: delete non-required instances of include <linux/init.h> Paul Gortmaker
2014-01-22  7:00 ` [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Stephen Rothwell
2014-01-23  0:38   ` Paul Gortmaker
2014-01-28  3:13     ` Benjamin Herrenschmidt
2014-01-28 16:21       ` Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52DEF366.6030105@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=agraf@suse.de \
    --cc=gleb@kernel.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).