diff options
author | David Howells <dhowells@redhat.com> | 2012-03-28 21:30:02 +0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-03-28 21:30:02 +0400 |
commit | 1c80f22f8d809a9a9024aad7a5bd093f078e77cf (patch) | |
tree | 116af9c3b675d888f63910adefe1557528726736 /arch/mn10300/include/asm/barrier.h | |
parent | b81947c646bfefdf98e2fde5d7d39cbbda8525d4 (diff) | |
download | linux-1c80f22f8d809a9a9024aad7a5bd093f078e77cf.tar.xz |
Disintegrate asm/system.h for MN10300
Disintegrate asm/system.h for MN10300.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-am33-list@redhat.com
Diffstat (limited to 'arch/mn10300/include/asm/barrier.h')
-rw-r--r-- | arch/mn10300/include/asm/barrier.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/mn10300/include/asm/barrier.h b/arch/mn10300/include/asm/barrier.h new file mode 100644 index 000000000000..2bd97a5c8af7 --- /dev/null +++ b/arch/mn10300/include/asm/barrier.h @@ -0,0 +1,37 @@ +/* MN10300 memory barrier definitions + * + * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public Licence + * as published by the Free Software Foundation; either version + * 2 of the Licence, or (at your option) any later version. + */ +#ifndef _ASM_BARRIER_H +#define _ASM_BARRIER_H + +#define nop() asm volatile ("nop") + +#define mb() asm volatile ("": : :"memory") +#define rmb() mb() +#define wmb() asm volatile ("": : :"memory") + +#ifdef CONFIG_SMP +#define smp_mb() mb() +#define smp_rmb() rmb() +#define smp_wmb() wmb() +#define set_mb(var, value) do { xchg(&var, value); } while (0) +#else /* CONFIG_SMP */ +#define smp_mb() barrier() +#define smp_rmb() barrier() +#define smp_wmb() barrier() +#define set_mb(var, value) do { var = value; mb(); } while (0) +#endif /* CONFIG_SMP */ + +#define set_wmb(var, value) do { var = value; wmb(); } while (0) + +#define read_barrier_depends() do {} while (0) +#define smp_read_barrier_depends() do {} while (0) + +#endif /* _ASM_BARRIER_H */ |