diff options
author | David Howells <dhowells@redhat.com> | 2012-03-28 19:30:02 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-03-28 19:30:02 +0200 |
commit | a5401ee3da720d29bcce90ed352738c85a71f6cf (patch) | |
tree | 4fc07d751864b455b12272ea0bbc126140f4c446 /arch/h8300/include/asm/barrier.h | |
parent | Disintegrate asm/system.h for FRV (diff) | |
download | linux-a5401ee3da720d29bcce90ed352738c85a71f6cf.tar.xz linux-a5401ee3da720d29bcce90ed352738c85a71f6cf.zip |
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.h | 27 |
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 @@ +#ifndef _H8300_BARRIER_H +#define _H8300_BARRIER_H + +#define nop() asm volatile ("nop"::) + +/* + * Force strict CPU ordering. + * Not really required on H8... + */ +#define mb() asm volatile ("" : : :"memory") +#define rmb() asm volatile ("" : : :"memory") +#define wmb() asm volatile ("" : : :"memory") +#define set_mb(var, value) do { xchg(&var, value); } while (0) + +#ifdef CONFIG_SMP +#define smp_mb() mb() +#define smp_rmb() rmb() +#define smp_wmb() wmb() +#define smp_read_barrier_depends() read_barrier_depends() +#else +#define smp_mb() barrier() +#define smp_rmb() barrier() +#define smp_wmb() barrier() +#define smp_read_barrier_depends() do { } while(0) +#endif + +#endif /* _H8300_BARRIER_H */ |