Skip to content

Commit e2164f0

Browse files
committed
perf tools: Move mips barrier.h stuff to tools/arch/mips/include/asm/barrier.h
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: Deng-Cheng Zhu <dengcheng.zhu@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: Ralf Baechle <ralf@linux-mips.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-c5a8m8lbjuy0agep6giykxbz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 3d3337d commit e2164f0

4 files changed

Lines changed: 23 additions & 9 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifndef _TOOLS_LINUX_ASM_MIPS_BARRIER_H
2+
#define _TOOLS_LINUX_ASM_MIPS_BARRIER_H
3+
/*
4+
* FIXME: This came from tools/perf/perf-sys.h, where it was first introduced
5+
* in c1e028ef40b8d6943b767028ba17d4f2ba020edb, more work needed to make it
6+
* more closely follow the Linux kernel arch/mips/include/asm/barrier.h file.
7+
* Probably when we continue work on tools/ Kconfig support to have all the
8+
* CONFIG_ needed for properly doing that.
9+
*/
10+
#define mb() asm volatile( \
11+
".set mips2\n\t" \
12+
"sync\n\t" \
13+
".set mips0" \
14+
: /* no output */ \
15+
: /* no input */ \
16+
: "memory")
17+
#define wmb() mb()
18+
#define rmb() mb()
19+
20+
#endif /* _TOOLS_LINUX_ASM_MIPS_BARRIER_H */

‎tools/include/asm/barrier.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "../../arch/sparc/include/asm/barrier.h"
1515
#elif defined(__alpha__)
1616
#include "../../arch/alpha/include/asm/barrier.h"
17+
#elif defined(__mips__)
18+
#include "../../arch/mips/include/asm/barrier.h"
1719
#elif defined(__ia64__)
1820
#include "../../arch/ia64/include/asm/barrier.h"
1921
#elif defined(__xtensa__)

‎tools/perf/MANIFEST‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ tools/perf
22
tools/arch/alpha/include/asm/barrier.h
33
tools/arch/arm/include/asm/barrier.h
44
tools/arch/ia64/include/asm/barrier.h
5+
tools/arch/mips/include/asm/barrier.h
56
tools/arch/powerpc/include/asm/barrier.h
67
tools/arch/s390/include/asm/barrier.h
78
tools/arch/sh/include/asm/barrier.h

‎tools/perf/perf-sys.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@
7878
#endif
7979

8080
#ifdef __mips__
81-
#define mb() asm volatile( \
82-
".set mips2\n\t" \
83-
"sync\n\t" \
84-
".set mips0" \
85-
: /* no output */ \
86-
: /* no input */ \
87-
: "memory")
88-
#define wmb() mb()
89-
#define rmb() mb()
9081
#define CPUINFO_PROC {"cpu model"}
9182
#endif
9283

0 commit comments

Comments
 (0)