mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
perf tools: Move s390 barrier.h stuff to tools/arch/s390/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 <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
e43a19c9c2
commit
07d207ac0c
4 changed files with 33 additions and 3 deletions
30
tools/arch/s390/include/asm/barrier.h
Normal file
30
tools/arch/s390/include/asm/barrier.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copied from the kernel sources:
|
||||
*
|
||||
* Copyright IBM Corp. 1999, 2009
|
||||
*
|
||||
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_LINUX_ASM_BARRIER_H
|
||||
#define __TOOLS_LINUX_ASM_BARRIER_H
|
||||
|
||||
/*
|
||||
* Force strict CPU ordering.
|
||||
* And yes, this is required on UP too when we're talking
|
||||
* to devices.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES
|
||||
/* Fast-BCR without checkpoint synchronization */
|
||||
#define __ASM_BARRIER "bcr 14,0\n"
|
||||
#else
|
||||
#define __ASM_BARRIER "bcr 15,0\n"
|
||||
#endif
|
||||
|
||||
#define mb() do { asm volatile(__ASM_BARRIER : : : "memory"); } while (0)
|
||||
|
||||
#define rmb() mb()
|
||||
#define wmb() mb()
|
||||
|
||||
#endif /* __TOOLS_LIB_ASM_BARRIER_H */
|
||||
Loading…
Reference in a new issue