aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/include/asm/barrier.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-03-28 13:30:02 -0400
committerDavid Howells <dhowells@redhat.com>2012-03-28 13:30:02 -0400
commita5401ee3da720d29bcce90ed352738c85a71f6cf (patch)
tree4fc07d751864b455b12272ea0bbc126140f4c446 /arch/h8300/include/asm/barrier.h
parent40ab3317493609c9a8199492588ae7bf88eb12d6 (diff)
Disintegrate asm/system.h for H8300
Disintegrate asm/system.h for H8300. Signed-off-by: David Howells <dhowells@redhat.com> cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'arch/h8300/include/asm/barrier.h')
-rw-r--r--arch/h8300/include/asm/barrier.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/h8300/include/asm/barrier.h b/arch/h8300/include/asm/barrier.h
new file mode 100644
index 000000000000..c7283c343c55
--- /dev/null
+++ b/arch/h8300/include/asm/barrier.h
@@ -0,0 +1,27 @@
1#ifndef _H8300_BARRIER_H
2#define _H8300_BARRIER_H
3
4#define nop() asm volatile ("nop"::)
5
6/*
7 * Force strict CPU ordering.
8 * Not really required on H8...
9 */
10#define mb() asm volatile ("" : : :"memory")
11#define rmb() asm volatile ("" : : :"memory")
12#define wmb() asm volatile ("" : : :"memory")
13#define set_mb(var, value) do { xchg(&var, value); } while (0)
14
15#ifdef CONFIG_SMP
16#define smp_mb() mb()
17#define smp_rmb() rmb()
18#define smp_wmb() wmb()
19#define smp_read_barrier_depends() read_barrier_depends()
20#else
21#define smp_mb() barrier()
22#define smp_rmb() barrier()
23#define smp_wmb() barrier()
24#define smp_read_barrier_depends() do { } while(0)
25#endif
26
27#endif /* _H8300_BARRIER_H */