lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] compiler-intel: fix wrong compiler barrier() macro
On Wed, Apr 29, 2015 at 10:51:40AM -0400, Pranith Kumar wrote:
> Hi Daniel,
>
> On Wed, Apr 29, 2015 at 10:42 AM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> > Cleanup commit 23ebdedc67e ("compiler-intel.h: Remove duplicate
> > definition") removed the double definition of __memory_barrier()
> > intrinsics.
> >
> > However, in doing so, it also removed the preceding #undef barrier,
> > meaning, the actual barrier() macro from compiler-gcc.h with inline
> > asm is still in place when __GNUC__ is provided.
>
> When you use the Intel compilers, the barrier() definition will come
> from compiler.h and not compiler-gcc.h. That is what the commit
> message says in 73679e508201(your commit message has the wrong hash).
> I don't understand what problem you are seeing with this, can you
> please explain?
>
> Thanks!

Hi Pranith.

The problem is that ICC defines __GNUC__ so barrier() gets defined
in compiler-gcc.h. Your commit removed an #undef from compiler-intel.h
so compiler.h will never define barrier to __memory_barrier().

--mancha
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-04-29 17:41    [W:0.075 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site