Skip to content

Commit

Permalink
s390/barrier: convert mb() to define again
Browse files Browse the repository at this point in the history
Some of the now available common code drivers only compile if mb() is a define.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Feb 14, 2013
1 parent 1aae056 commit e06ef37
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/s390/include/asm/barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@
* to devices.
*/

static inline void mb(void)
{
#ifdef CONFIG_HAVE_MARCH_Z196_FEATURES
/* Fast-BCR without checkpoint synchronization */
asm volatile("bcr 14,0" : : : "memory");
/* Fast-BCR without checkpoint synchronization */
#define mb() do { asm volatile("bcr 14,0" : : : "memory"); } while (0)
#else
asm volatile("bcr 15,0" : : : "memory");
#define mb() do { asm volatile("bcr 15,0" : : : "memory"); } while (0)
#endif
}

#define rmb() mb()
#define wmb() mb()
Expand Down

0 comments on commit e06ef37

Please sign in to comment.