public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Hollis Blanchard <hollisb@us•ibm.com>
Cc: Avi Kivity <avi@redhat•com>,
	linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>
Subject: Re: KVM: powerpc: Fix BUILD_BUG_ON condition
Date: Mon, 2 Nov 2009 17:08:15 +1100	[thread overview]
Message-ID: <20091102170815.86e2daf7.sfr@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

Hi Hollis, Avi,

This commit was added to the kvm tree recently:

> Author: Hollis Blanchard <hollisb@us•ibm.com>
> Date:   Fri Oct 23 00:35:30 2009 +0000
> 
>     KVM: powerpc: Fix BUILD_BUG_ON condition
>     
>     The old BUILD_BUG_ON implementation didn't work with __builtin_constant_p().
>     Fixing that revealed this test had been inverted for a long time without
>     anybody noticing...
>     
>     Signed-off-by: Hollis Blanchard <hollisb@us•ibm.com>
>     Signed-off-by: Avi Kivity <avi@redhat•com>
> 
> diff --git a/arch/powerpc/kvm/timing.h b/arch/powerpc/kvm/timing.h
> index bb13b1f..a550f0f 100644
> --- a/arch/powerpc/kvm/timing.h
> +++ b/arch/powerpc/kvm/timing.h
> @@ -48,7 +48,7 @@ static inline void kvmppc_set_exit_type(struct kvm_vcpu *vcpu, int type) {}
>  static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type)
>  {
>  	/* type has to be known at build time for optimization */
> -	BUILD_BUG_ON(__builtin_constant_p(type));
> +	BUILD_BUG_ON(!__builtin_constant_p(type));
>  	switch (type) {
>  	case EXT_INTR_EXITS:
>  		vcpu->stat.ext_intr_exits++;

It is OK as far as it goes.  It still does not build, though, due to the
new BUILD_BUG_ON macro.  So I have still commented out the BUILD_BUG_ON
in linux-next.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2009-11-02  6:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02  6:08 Stephen Rothwell [this message]
2009-11-02 16:42 ` KVM: powerpc: Fix BUILD_BUG_ON condition Hollis Blanchard

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=20091102170815.86e2daf7.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=avi@redhat$(echo .)com \
    --cc=hollisb@us$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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