diff --git a/tools/arch/xtensa/include/asm/barrier.h b/tools/arch/xtensa/include/asm/barrier.h new file mode 100644 index 0000000000000000000000000000000000000000..583800bd7259077d8f4386b27d0f4cac26543e3c --- /dev/null +++ b/tools/arch/xtensa/include/asm/barrier.h @@ -0,0 +1,18 @@ +/* + * Copied from the kernel sources to tools/: + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2001 - 2012 Tensilica Inc. + */ + +#ifndef _TOOLS_LINUX_XTENSA_SYSTEM_H +#define _TOOLS_LINUX_XTENSA_SYSTEM_H + +#define mb() ({ __asm__ __volatile__("memw" : : : "memory"); }) +#define rmb() barrier() +#define wmb() mb() + +#endif /* _TOOLS_LINUX_XTENSA_SYSTEM_H */ diff --git a/tools/include/asm/barrier.h b/tools/include/asm/barrier.h index d2ddca50ec72d2644e222ba9aa949bcd7cd75553..ccb2244903a4c422df594571b14f2c4ed6b7dd2b 100644 --- a/tools/include/asm/barrier.h +++ b/tools/include/asm/barrier.h @@ -16,4 +16,6 @@ #include "../../arch/alpha/include/asm/barrier.h" #elif defined(__ia64__) #include "../../arch/ia64/include/asm/barrier.h" +#elif defined(__xtensa__) +#include "../../arch/xtensa/include/asm/barrier.h" #endif diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST index 1b330dd8a137572d8b3e974c9b6901fae3973bdc..6d3c398c1021a0a77fa2b17fdca5f83fd0b2117d 100644 --- a/tools/perf/MANIFEST +++ b/tools/perf/MANIFEST @@ -9,6 +9,7 @@ tools/arch/sparc/include/asm/barrier.h tools/arch/sparc/include/asm/barrier_32.h tools/arch/sparc/include/asm/barrier_64.h tools/arch/x86/include/asm/barrier.h +tools/arch/xtensa/include/asm/barrier.h tools/scripts tools/build tools/lib/traceevent diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h index 56edbe16f583c30a6d7bd2061fa52b78c9cb973d..ebe228f1bde4b85f35068eccf35e0db55cefeeb4 100644 --- a/tools/perf/perf-sys.h +++ b/tools/perf/perf-sys.h @@ -105,9 +105,6 @@ #endif #ifdef __xtensa__ -#define mb() asm volatile("memw" ::: "memory") -#define wmb() asm volatile("memw" ::: "memory") -#define rmb() asm volatile("" ::: "memory") #define CPUINFO_PROC {"core ID"} #endif