linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: Daniel Axtens <dja@axtens.net>
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler
Date: Mon, 10 Oct 2016 13:34:15 +1100	[thread overview]
Message-ID: <20161010023415.GA18173@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <1476059480-18145-2-git-send-email-dja@axtens.net>

On Mon, Oct 10, 2016 at 11:31:20AM +1100, Daniel Axtens wrote:
> A bunch of KVM functions are only called from assembler.
> Give them prototypes in asm-prototypes.h
> This reduces sparse warnings.
> 
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
>  arch/powerpc/include/asm/asm-prototypes.h | 44 +++++++++++++++++++++++++++++++
>  arch/powerpc/kvm/book3s_64_vio_hv.c       |  1 +
>  arch/powerpc/kvm/book3s_hv_builtin.c      |  1 +
>  arch/powerpc/kvm/book3s_hv_ras.c          |  1 +
>  arch/powerpc/kvm/book3s_hv_rm_mmu.c       |  1 +
>  arch/powerpc/kvm/book3s_hv_rm_xics.c      |  1 +
>  6 files changed, 49 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
> index d1492736d852..6c853bcd11fa 100644
> --- a/arch/powerpc/include/asm/asm-prototypes.h
> +++ b/arch/powerpc/include/asm/asm-prototypes.h
> @@ -14,6 +14,9 @@
>  
>  #include <linux/threads.h>
>  #include <linux/kprobes.h>
> +#ifdef CONFIG_KVM
> +#include <linux/kvm_host.h>
> +#endif
>  
>  #include <uapi/asm/ucontext.h>
>  
> @@ -109,4 +112,45 @@ void early_setup_secondary(void);
>  /* time */
>  void accumulate_stolen_time(void);
>  
> +/* kvm */
> +#ifdef CONFIG_KVM

Why do we need this ifdef?  Does the compilation break without it when
CONFIG_KVM = n?

Paul.

  reply	other threads:[~2016-10-10  2:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10  0:31 [PATCH 1/2] KVM: PPC: Fix sparse static warning Daniel Axtens
2016-10-10  0:31 ` [PATCH 2/2] KVM: PPC: sparse: prototypes for functions called from assembler Daniel Axtens
2016-10-10  2:34   ` Paul Mackerras [this message]
2016-10-10  2:52     ` Daniel Axtens
2016-11-21  5:05   ` Paul Mackerras
2016-11-21  5:04 ` [PATCH 1/2] KVM: PPC: Fix sparse static warning Paul Mackerras

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=20161010023415.GA18173@fergus.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=dja@axtens.net \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).