perf tools: Move alpha barrier.h stuff to tools/arch/alpha/include/asm/barrier.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 7 May 2015 20:52:19 +0000 (17:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 8 May 2015 19:05:06 +0000 (16:05 -0300)
We will need it for atomic.h, so move it from the ad-hoc tools/perf/
place to a tools/ subset of the kernel arch/ hierarchy.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vs2plxuph0ne3zcupijgjy9z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/arch/alpha/include/asm/barrier.h [new file with mode: 0644]
tools/include/asm/barrier.h
tools/perf/MANIFEST
tools/perf/perf-sys.h

diff --git a/tools/arch/alpha/include/asm/barrier.h b/tools/arch/alpha/include/asm/barrier.h
new file mode 100644 (file)
index 0000000..95df19c
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __TOOLS_LINUX_ASM_ALPHA_BARRIER_H
+#define __TOOLS_LINUX_ASM_ALPHA_BARRIER_H
+
+#define mb()   __asm__ __volatile__("mb": : :"memory")
+#define rmb()  __asm__ __volatile__("mb": : :"memory")
+#define wmb()  __asm__ __volatile__("wmb": : :"memory")
+
+#endif         /* __TOOLS_LINUX_ASM_ALPHA_BARRIER_H */
index 87f6309ef97d71fcde8c899055e3a7960b452719..a579a2e85711b36cfb1724a1dc586c82276f4f2e 100644 (file)
@@ -8,4 +8,6 @@
 #include "../../arch/sh/include/asm/barrier.h"
 #elif defined(__sparc__)
 #include "../../arch/sparc/include/asm/barrier.h"
+#elif defined(__alpha__)
+#include "../../arch/alpha/include/asm/barrier.h"
 #endif
index ee692408f8dd8412f68f970705132d1ad854de62..9919ee3eae52a138ea719617077882cfeb6db370 100644 (file)
@@ -1,4 +1,5 @@
 tools/perf
+tools/arch/alpha/include/asm/barrier.h
 tools/arch/powerpc/include/asm/barrier.h
 tools/arch/s390/include/asm/barrier.h
 tools/arch/sh/include/asm/barrier.h
index b3e911afa1de7a66439f0ddb1d69dde9e58fbdd7..4710f057150de1fadac325f72419d01da304d980 100644 (file)
@@ -61,9 +61,6 @@
 #endif
 
 #ifdef __alpha__
-#define mb()           asm volatile("mb" ::: "memory")
-#define wmb()          asm volatile("wmb" ::: "memory")
-#define rmb()          asm volatile("mb" ::: "memory")
 #define CPUINFO_PROC   {"cpu model"}
 #endif