mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf tools: Move x86 barrier.h stuff to tools/arch/x86/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. Other aches will follow, each in a cset. 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-vy6bqmsvm6puibpay2cy4wid@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
f8bffbf122
commit
361c564eef
4 changed files with 34 additions and 6 deletions
|
@ -6,11 +6,9 @@
|
|||
#include <sys/syscall.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/perf_event.h>
|
||||
#include <asm/barrier.h>
|
||||
|
||||
#if defined(__i386__)
|
||||
#define mb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
|
||||
#define wmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
|
||||
#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
|
||||
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
|
||||
#define CPUINFO_PROC {"model name"}
|
||||
#ifndef __NR_perf_event_open
|
||||
|
@ -25,9 +23,6 @@
|
|||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#define mb() asm volatile("mfence" ::: "memory")
|
||||
#define wmb() asm volatile("sfence" ::: "memory")
|
||||
#define rmb() asm volatile("lfence" ::: "memory")
|
||||
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
|
||||
#define CPUINFO_PROC {"model name"}
|
||||
#ifndef __NR_perf_event_open
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue