Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396907

Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16()

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16()
Date 2016-05-09 12:20 +0200
Message-ID <rwQsa-3re-15@gated-at.bofh.it> (permalink)
References <rvG1Q-6VA-3@gated-at.bofh.it> <rwN1g-7fr-23@gated-at.bofh.it> <rwPPt-2FZ-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-05-06 07:00 +0200
  Re: linux-next: build failure after merge of the akpm-current tree Andrew Morton <akpm@linux-foundation.org> - 2016-05-06 07:50 +0200
    Re: linux-next: build failure after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-05-06 08:10 +0200
      Re: linux-next: build failure after merge of the akpm-current tree Michael Ellerman <mpe@ellerman.id.au> - 2016-05-06 09:00 +0200
        [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16() Josh Poimboeuf <jpoimboe@redhat.com> - 2016-05-06 16:30 +0200
          Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc  __builtin_bswap16() Stephen Rothwell <sfr@canb.auug.org.au> - 2016-05-09 03:00 +0200
            Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16() Sedat Dilek <sedat.dilek@gmail.com> - 2016-05-09 07:40 +0200
              Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc  __builtin_bswap16() Stephen Rothwell <sfr@canb.auug.org.au> - 2016-05-09 10:40 +0200
            Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc  __builtin_bswap16() Stephen Rothwell <sfr@canb.auug.org.au> - 2016-05-09 08:40 +0200
              Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc  __builtin_bswap16() Michael Ellerman <mpe@ellerman.id.au> - 2016-05-09 11:40 +0200
                Re: [PATCH] compiler-gcc: require gcc 4.8 for powerpc __builtin_bswap16() Arnd Bergmann <arnd@arndb.de> - 2016-05-09 12:20 +0200
                [PATCH] compiler-gcc: require gcc 4.8 for powerpc  __builtin_bswap16() Stephen Rothwell <sfr@canb.auug.org.au> - 2016-05-09 12:40 +0200

csiph-web