Skip to content

Commit 3d3337d

Browse files
committed
perf tools: Move xtensa barrier.h stuff to tools/arch/xtensa/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: 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-lp68dspbtjcwbpzd7x5c6zp5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 4f3db07 commit 3d3337d

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copied from the kernel sources to tools/:
3+
*
4+
* This file is subject to the terms and conditions of the GNU General Public
5+
* License. See the file "COPYING" in the main directory of this archive
6+
* for more details.
7+
*
8+
* Copyright (C) 2001 - 2012 Tensilica Inc.
9+
*/
10+
11+
#ifndef _TOOLS_LINUX_XTENSA_SYSTEM_H
12+
#define _TOOLS_LINUX_XTENSA_SYSTEM_H
13+
14+
#define mb() ({ __asm__ __volatile__("memw" : : : "memory"); })
15+
#define rmb() barrier()
16+
#define wmb() mb()
17+
18+
#endif /* _TOOLS_LINUX_XTENSA_SYSTEM_H */

‎tools/include/asm/barrier.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@
1616
#include "../../arch/alpha/include/asm/barrier.h"
1717
#elif defined(__ia64__)
1818
#include "../../arch/ia64/include/asm/barrier.h"
19+
#elif defined(__xtensa__)
20+
#include "../../arch/xtensa/include/asm/barrier.h"
1921
#endif

‎tools/perf/MANIFEST‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tools/arch/sparc/include/asm/barrier.h
99
tools/arch/sparc/include/asm/barrier_32.h
1010
tools/arch/sparc/include/asm/barrier_64.h
1111
tools/arch/x86/include/asm/barrier.h
12+
tools/arch/xtensa/include/asm/barrier.h
1213
tools/scripts
1314
tools/build
1415
tools/lib/traceevent

‎tools/perf/perf-sys.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@
105105
#endif
106106

107107
#ifdef __xtensa__
108-
#define mb() asm volatile("memw" ::: "memory")
109-
#define wmb() asm volatile("memw" ::: "memory")
110-
#define rmb() asm volatile("" ::: "memory")
111108
#define CPUINFO_PROC {"core ID"}
112109
#endif
113110

0 commit comments

Comments
 (0)