diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-05-14 06:40:43 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-05-16 08:42:45 -0400 |
commit | c6f48b0bbeba86f12847b16b1d4631363037f7f3 (patch) | |
tree | 75dfcb152550743df4913fc18caa10d5e63cb33b | |
parent | 521674e4ffad2b2fc8c56cd79e4b2c07c074e9cb (diff) |
s390/barrier: cleanup barrier functions
s390 really has no eieio instruction, so get rid of the implied ppc
semantics and in addition change mb() into a function.
Also remove SYNC_OTHER_CORES() since it is unused.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/barrier.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h index 451273ad4d34..6993b20d64fb 100644 --- a/arch/s390/include/asm/barrier.h +++ b/arch/s390/include/asm/barrier.h | |||
@@ -11,25 +11,23 @@ | |||
11 | * Force strict CPU ordering. | 11 | * Force strict CPU ordering. |
12 | * And yes, this is required on UP too when we're talking | 12 | * And yes, this is required on UP too when we're talking |
13 | * to devices. | 13 | * to devices. |
14 | * | ||
15 | * This is very similar to the ppc eieio/sync instruction in that is | ||
16 | * does a checkpoint syncronisation & makes sure that | ||
17 | * all memory ops have completed wrt other CPU's ( see 7-15 POP DJB ). | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | #define eieio() asm volatile("bcr 15,0" : : : "memory") | 16 | static inline void mb(void) |
21 | #define SYNC_OTHER_CORES(x) eieio() | 17 | { |
22 | #define mb() eieio() | 18 | asm volatile("bcr 15,0" : : : "memory"); |
23 | #define rmb() eieio() | 19 | } |
24 | #define wmb() eieio() | 20 | |
25 | #define read_barrier_depends() do { } while(0) | 21 | #define rmb() mb() |
26 | #define smp_mb() mb() | 22 | #define wmb() mb() |
27 | #define smp_rmb() rmb() | 23 | #define read_barrier_depends() do { } while(0) |
28 | #define smp_wmb() wmb() | 24 | #define smp_mb() mb() |
29 | #define smp_read_barrier_depends() read_barrier_depends() | 25 | #define smp_rmb() rmb() |
30 | #define smp_mb__before_clear_bit() smp_mb() | 26 | #define smp_wmb() wmb() |
31 | #define smp_mb__after_clear_bit() smp_mb() | 27 | #define smp_read_barrier_depends() read_barrier_depends() |
28 | #define smp_mb__before_clear_bit() smp_mb() | ||
29 | #define smp_mb__after_clear_bit() smp_mb() | ||
32 | 30 | ||
33 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 31 | #define set_mb(var, value) do { var = value; mb(); } while (0) |
34 | 32 | ||
35 | #endif /* __ASM_BARRIER_H */ | 33 | #endif /* __ASM_BARRIER_H */ |