linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16()
Date: Mon, 09 May 2016 12:16:11 +0200	[thread overview]
Message-ID: <75773040.xkfFJb3GoQ@wuerfel> (raw)
In-Reply-To: <1462786493.5531.1.camel@ellerman.id.au>

On Monday 09 May 2016 19:34:53 Michael Ellerman wrote:
> On Mon, 2016-05-09 at 16:33 +1000, Stephen Rothwell wrote:
> > On Mon, 9 May 2016 10:59:27 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > On Fri, 6 May 2016 09:22:25 -0500 Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > > > diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
> > > > index eeae401..3d5202e 100644
> > > > --- a/include/linux/compiler-gcc.h
> > > > +++ b/include/linux/compiler-gcc.h
> > > > @@ -246,7 +246,7 @@
> > > >  #define __HAVE_BUILTIN_BSWAP32__
> > > >  #define __HAVE_BUILTIN_BSWAP64__
> > > >  #endif
> > > > -#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600)
> > > > +#if GCC_VERSION >= 40800
> > > >  #define __HAVE_BUILTIN_BSWAP16__
> > > >  #endif
> > > >  #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
> > 
> > Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: Arnd Bergmann <arnd@arndb.de>

> > Michael, do you want to pass the fix patch on, or will I submit it
> > directly to Linus?
> 
> I'm happy for you to send it, I haven't actually hit the bug myself.

I found the commit in gcc-4.8 that replaced the powerpc-specific implementation
of __builtin_bswap16 with an architecture-independent one. Apparently the
powerpc version (gcc-4.6 and 4.7) just mapped to the lhbrx/sthbrx instructions,
so it ended up not being a constant, though the intent of the patch was
mainly to add support for the builtin to x86.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 has the patch that went
into gcc-4.8 and more information.

	Arnd

  reply	other threads:[~2016-05-09 10:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  4:58 linux-next: build failure after merge of the akpm-current tree Stephen Rothwell
2016-05-06  5:44 ` Andrew Morton
2016-05-06  6:09   ` Stephen Rothwell
2016-05-06  6:55     ` Michael Ellerman
2016-05-06 14:22       ` [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16() Josh Poimboeuf
2016-05-09  0:59         ` Stephen Rothwell
2016-05-09  5:39           ` Sedat Dilek
2016-05-09  8:31             ` Stephen Rothwell
2016-05-09  6:33           ` Stephen Rothwell
2016-05-09  9:34             ` Michael Ellerman
2016-05-09 10:16               ` Arnd Bergmann [this message]
2016-05-09 10:36                 ` Stephen Rothwell
2016-06-15  9:33   ` linux-next: build failure after merge of the akpm-current tree Paul Bolle
2016-06-15 14:03     ` Josh Poimboeuf
2016-06-15 21:12       ` Paul Bolle

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=75773040.xkfFJb3GoQ@wuerfel \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.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).