Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-20 Thread Linus Torvalds
On Thu, Nov 20, 2014 at 3:39 AM, Christian Borntraeger wrote: > > So It looks like we could make a change to ACCESS_ONCE. Would something like > > CONFIG_ARCH_SCALAR_ACCESS_ONCE be a good start? No, if it's just a handful of places to be fixed, let's not add config options for broken cases. > Th

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-20 Thread Christian Borntraeger
Am 10.11.2014 um 22:07 schrieb Linus Torvalds: [...] > So before blacklisting any compilers, let's first see if > > (a) we can actually make it a real rule that we only use ACCESS_ONCE on > scalars > (b) we can somehow enforce this with a compiler warning/error for mis-uses > > For example, th

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-12 Thread Martin Schwidefsky
On Tue, 11 Nov 2014 16:36:06 -0800 Linus Torvalds wrote: > On Tue, Nov 11, 2014 at 4:33 PM, Linus Torvalds > wrote: > > > > I guess as a workaround it is fine, as long as we don't lose sight of > > trying to eventually do a better job. > > Oh, and when it comes to the actual gcc bug - do you ha

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-12 Thread Christian Borntraeger
Am 12.11.2014 um 01:36 schrieb Linus Torvalds: > On Tue, Nov 11, 2014 at 4:33 PM, Linus Torvalds > wrote: >> >> I guess as a workaround it is fine, as long as we don't lose sight of >> trying to eventually do a better job. > > Oh, and when it comes to the actual gcc bug - do you have any reason >

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-11 Thread Linus Torvalds
On Tue, Nov 11, 2014 at 4:33 PM, Linus Torvalds wrote: > > I guess as a workaround it is fine, as long as we don't lose sight of > trying to eventually do a better job. Oh, and when it comes to the actual gcc bug - do you have any reason to believe that it's somehow triggered more easily by somet

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-11 Thread Linus Torvalds
On Tue, Nov 11, 2014 at 1:16 PM, Christian Borntraeger wrote: > > Are you ok with the patch as is in kvm/next for the time being or shall > we revert that and replace it with the .val scheme? Is that the one that was quoted at the beginning of the thread, that uses barrier()? I guess as a workar

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-11 Thread Christian Borntraeger
Am 10.11.2014 um 22:07 schrieb Linus Torvalds: > On Mon, Nov 10, 2014 at 12:18 PM, Christian Borntraeger > wrote: >> >> Now: I can reproduces belows miscompile on gcc46 and gcc 47 >> gcc 45 seems ok, gcc 48 is fixed. This makes blacklisting >> a bit hard, especially since it is not limited to s39

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-10 Thread Paul E. McKenney
On Mon, Nov 10, 2014 at 01:07:33PM -0800, Linus Torvalds wrote: > On Mon, Nov 10, 2014 at 12:18 PM, Christian Borntraeger > wrote: > > > > Now: I can reproduces belows miscompile on gcc46 and gcc 47 > > gcc 45 seems ok, gcc 48 is fixed. This makes blacklisting > > a bit hard, especially since it

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-10 Thread Linus Torvalds
On Mon, Nov 10, 2014 at 12:18 PM, Christian Borntraeger wrote: > > Now: I can reproduces belows miscompile on gcc46 and gcc 47 > gcc 45 seems ok, gcc 48 is fixed. This makes blacklisting > a bit hard, especially since it is not limited to s390, but > covers all architectures. > In essence ACCESS_