From: Michael Ellerman <mpe@ellerman.id.au>
To: Boqun Feng <boqun.feng@gmail.com>,
Pan Xinhui <xinhui@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
open list <linux-kernel@vger.kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
"'Peter Zijlstra (Intel)\"" <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] arch/powerpc: use BUILD_BUG() when detect unfit {cmp}xchg, size
Date: Tue, 23 Feb 2016 21:39:52 +1100 [thread overview]
Message-ID: <1456223992.3192.0.camel@ellerman.id.au> (raw)
In-Reply-To: <20160223091525.GA2918@fixme-laptop.cn.ibm.com>
On Tue, 2016-02-23 at 17:15 +0800, Boqun Feng wrote:
> On Tue, Feb 23, 2016 at 04:45:16PM +0800, Pan Xinhui wrote:
> > From: pan xinhui <xinhui.pan@linux.vnet.ibm.com>
> >
> > diff --git a/arch/powerpc/include/asm/cmpxchg.h b/arch/powerpc/include/asm/cmpxchg.h
> > index d1a8d93..20c0a30 100644
> > --- a/arch/powerpc/include/asm/cmpxchg.h
> > +++ b/arch/powerpc/include/asm/cmpxchg.h
> > @@ -92,12 +93,6 @@ __xchg_u64_local(volatile void *p, unsigned long val)
> > }
> > #endif
> >
> > -/*
> > - * This function doesn't exist, so you'll get a linker error
> > - * if something tries to do an invalid xchg().
> > - */
> > -extern void __xchg_called_with_bad_pointer(void);
> > -
> > static __always_inline unsigned long
> > __xchg(volatile void *ptr, unsigned long x, unsigned int size)
> > {
> > @@ -109,7 +104,7 @@ __xchg(volatile void *ptr, unsigned long x, unsigned int size)
> > return __xchg_u64(ptr, x);
> > #endif
> > }
> > - __xchg_called_with_bad_pointer();
> > + BUILD_BUG();
>
> Maybe we can use BUILD_BUG_ON_MSG(1, "Unsupported size for xchg"), which
> could provide more information.
Yes I would prefer there was a message. Please send a v2.
cheers
prev parent reply other threads:[~2016-02-23 10:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 8:45 [PATCH] arch/powerpc: use BUILD_BUG() when detect unfit {cmp}xchg, size Pan Xinhui
2016-02-23 9:15 ` Boqun Feng
2016-02-23 10:39 ` Michael Ellerman [this message]
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=1456223992.3192.0.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=xinhui@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.