mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
perf tools: Move barrier() definition to tools/include/linux/compiler.h
To make it generally accessible by other tools/ projects, also will be used in the tools/arch/*/include/asm/barrier.h files that are being introduced now. 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-qnjdqwu3vcnt14vqmr6wu788@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
07d207ac0c
commit
5ac69737dc
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
|||
#ifndef _TOOLS_LINUX_COMPILER_H_
|
||||
#define _TOOLS_LINUX_COMPILER_H_
|
||||
|
||||
/* Optimization barrier */
|
||||
/* The "volatile" is due to gcc bugs */
|
||||
#define barrier() __asm__ __volatile__("": : :"memory")
|
||||
|
||||
#ifndef __always_inline
|
||||
# define __always_inline inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
|
|
@ -153,8 +153,6 @@
|
|||
#define CPUINFO_PROC {"model name"}
|
||||
#endif
|
||||
|
||||
#define barrier() asm volatile ("" ::: "memory")
|
||||
|
||||
#ifndef cpu_relax
|
||||
#define cpu_relax() barrier()
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue