diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2012-11-23 21:22:08 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2012-12-19 00:10:23 -0500 |
commit | 599bf77a0d0b253dd94fd058275b05520c6d25db (patch) | |
tree | 4b6a0ae21bf0188adbe2a0f25ad2ac81a7d53af1 /arch/xtensa | |
parent | 71872b5fb2bed294fd5afd900890880e9faa82c1 (diff) |
xtensa: fix mb and wmb definitions
Define mb and wmb as memw to force memory barrier.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/barrier.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/xtensa/include/asm/barrier.h b/arch/xtensa/include/asm/barrier.h index 55707a8009d3..ef021677d536 100644 --- a/arch/xtensa/include/asm/barrier.h +++ b/arch/xtensa/include/asm/barrier.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 6 | * Copyright (C) 2001 - 2012 Tensilica Inc. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _XTENSA_SYSTEM_H | 9 | #ifndef _XTENSA_SYSTEM_H |
@@ -12,8 +12,8 @@ | |||
12 | #define smp_read_barrier_depends() do { } while(0) | 12 | #define smp_read_barrier_depends() do { } while(0) |
13 | #define read_barrier_depends() do { } while(0) | 13 | #define read_barrier_depends() do { } while(0) |
14 | 14 | ||
15 | #define mb() barrier() | 15 | #define mb() ({ __asm__ __volatile__("memw" : : : "memory"); }) |
16 | #define rmb() mb() | 16 | #define rmb() barrier() |
17 | #define wmb() mb() | 17 | #define wmb() mb() |
18 | 18 | ||
19 | #ifdef CONFIG_SMP | 19 | #ifdef CONFIG_SMP |