Skip to content
  • Daniel Borkmann's avatar
    compiler-intel: fix wrong compiler barrier() macro · b86a50c3
    Daniel Borkmann authored
    Cleanup commit 73679e50 ("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 by
    accident, meaning, the actual barrier() macro from compiler-gcc.h with
    inline asm is still in place as __GNUC__ is provided.
    
    Subsequently, barrier() can never be defined as __memory_barrier() from
    compiler.h since it already has a definition in place and if we trust
    the comment in compiler-intel.h, ecc doesn't support gcc specific asm
    statements.
    
    I don't have an ecc at hand (unsure if that's still used in the field?)
    and only found this by accident during code review, a revert of that
    cleanup would be simplest option.
    
    Fixes: 73679e50
    
     ("compiler-intel.h: Remove duplicate definition")
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: default avatarPranith Kumar <bobby.prani@gmail.com>
    Cc: Pranith Kumar <bobby.prani@gmail.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: mancha security <mancha1@zoho.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b86a50c3