summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-05-14 12:41:54 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-16 14:42:45 +0200
commite5b8d7553f87d939295e9eb0ca699c0030dc5ff1 (patch)
tree0b0586194a47d11ab07bd09bea2bdf692a2a9a44 /arch/s390
parentc6f48b0bbeba86f12847b16b1d4631363037f7f3 (diff)
s390/barrier: make use of fast-bcr facility
If the kernel gets compiled for at least z196, make use of the fast-BCR facility. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/barrier.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h
index 6993b20d64fb..10a508802940 100644
--- a/arch/s390/include/asm/barrier.h
+++ b/arch/s390/include/asm/barrier.h
@@ -15,7 +15,12 @@
static inline void mb(void)
{
+#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES
+ /* Fast-BCR without checkpoint synchronization */
+ asm volatile("bcr 14,0" : : : "memory");
+#else
asm volatile("bcr 15,0" : : : "memory");
+#endif
}
#define rmb() mb()