summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-05-07 16:04:06 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-08 15:05:04 -0400
commitc6e39db1d0284ff573f171b6754837d39b8a358d (patch)
tree9a251aa2c765c1bb52d70ede823e3c1f6b371313
parent5ac69737dc5e25fb1c26d18059c8e17ce2671d5d (diff)
tools: Adopt asm-generic/barrier.h
From the kernel's include/asm-generic/barrier.h, will be used by the sh barrier.h implementation. 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-emjznw0rjsmfyx2wfixss1gv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/include/asm-generic/barrier.h44
-rw-r--r--tools/perf/MANIFEST1
2 files changed, 45 insertions, 0 deletions
diff --git a/tools/include/asm-generic/barrier.h b/tools/include/asm-generic/barrier.h
new file mode 100644
index 000000000000..47b933903eaf
--- /dev/null
+++ b/tools/include/asm-generic/barrier.h
@@ -0,0 +1,44 @@
1/*
2 * Copied from the kernel sources to tools/perf/:
3 *
4 * Generic barrier definitions, originally based on MN10300 definitions.
5 *
6 * It should be possible to use these on really simple architectures,
7 * but it serves more as a starting point for new ports.
8 *
9 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
10 * Written by David Howells (dhowells@redhat.com)
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public Licence
14 * as published by the Free Software Foundation; either version
15 * 2 of the Licence, or (at your option) any later version.
16 */
17#ifndef __TOOLS_LINUX_ASM_GENERIC_BARRIER_H
18#define __TOOLS_LINUX_ASM_GENERIC_BARRIER_H
19
20#ifndef __ASSEMBLY__
21
22#include <linux/compiler.h>
23
24/*
25 * Force strict CPU ordering. And yes, this is required on UP too when we're
26 * talking to devices.
27 *
28 * Fall back to compiler barriers if nothing better is provided.
29 */
30
31#ifndef mb
32#define mb() barrier()
33#endif
34
35#ifndef rmb
36#define rmb() mb()
37#endif
38
39#ifndef wmb
40#define wmb() mb()
41#endif
42
43#endif /* !__ASSEMBLY__ */
44#endif /* __TOOLS_LINUX_ASM_GENERIC_BARRIER_H */
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index 00754afb4866..ac62cafa62ec 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -11,6 +11,7 @@ tools/lib/symbol/kallsyms.h
11tools/lib/util/find_next_bit.c 11tools/lib/util/find_next_bit.c
12tools/include/asm/barrier.h 12tools/include/asm/barrier.h
13tools/include/asm/bug.h 13tools/include/asm/bug.h
14tools/include/asm-generic/barrier.h
14tools/include/asm-generic/bitops/arch_hweight.h 15tools/include/asm-generic/bitops/arch_hweight.h
15tools/include/asm-generic/bitops/atomic.h 16tools/include/asm-generic/bitops/atomic.h
16tools/include/asm-generic/bitops/const_hweight.h 17tools/include/asm-generic/bitops/const_hweight.h