Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299506
| From | "Michael S. Tsirkin" <mst@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 20/34] ia64: define __smp_xxx |
| Date | 2015-12-30 23:00 +0100 |
| Message-ID | <qLwWK-3Ft-5@gated-at.bofh.it> (permalink) |
| References | <qLoZb-79S-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This defines __smp_XXX barriers for ia64,
for use by virtualization.
smp_XXX barriers are removed as they are
defined correctly by asm-generic/barriers.h
This reduces the amount of arch-specific boiler-plate code.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
arch/ia64/include/asm/barrier.h | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/arch/ia64/include/asm/barrier.h b/arch/ia64/include/asm/barrier.h
index 2f93348..588f161 100644
--- a/arch/ia64/include/asm/barrier.h
+++ b/arch/ia64/include/asm/barrier.h
@@ -42,28 +42,24 @@
#define dma_rmb() mb()
#define dma_wmb() mb()
-#ifdef CONFIG_SMP
-# define smp_mb() mb()
-#else
-# define smp_mb() barrier()
-#endif
+# define __smp_mb() mb()
-#define smp_mb__before_atomic() barrier()
-#define smp_mb__after_atomic() barrier()
+#define __smp_mb__before_atomic() barrier()
+#define __smp_mb__after_atomic() barrier()
/*
* IA64 GCC turns volatile stores into st.rel and volatile loads into ld.acq no
* need for asm trickery!
*/
-#define smp_store_release(p, v) \
+#define __smp_store_release(p, v) \
do { \
compiletime_assert_atomic_type(*p); \
barrier(); \
WRITE_ONCE(*p, v); \
} while (0)
-#define smp_load_acquire(p) \
+#define __smp_load_acquire(p) \
({ \
typeof(*p) ___p1 = READ_ONCE(*p); \
compiletime_assert_atomic_type(*p); \
--
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 20:40 +0100
Re: [PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt David Miller <davem@davemloft.net> - 2015-12-30 21:50 +0100
Re: [PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 22:40 +0100
Re: [PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt David Miller <davem@davemloft.net> - 2015-12-30 23:00 +0100
[PATCH 17/34] arm64: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 22:50 +0100
[PATCH 18/34] arm: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 22:50 +0100
Re: [PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 22:50 +0100
Re: [PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt Arnd Bergmann <arnd@arndb.de> - 2015-12-30 23:50 +0100
[PATCH 20/34] ia64: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 28/34] x86: define __smp_xxX "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 26/34] tile: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 31/34] xenbus: use __smp_xxx barriers "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 23/34] s390: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 21/34] metag: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 22/34] mips: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 24/34] sh: define __smp_xxx, fix smp_store_mb for !SMP "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 27/34] xtensa: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 25/34] sparc: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 19/34] blackfin: define __smp_xxx "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
[PATCH 32/34] xen/io: use __smp_xxx barriers "Michael S. Tsirkin" <mst@redhat.com> - 2015-12-30 23:00 +0100
csiph-web