Skip to content

Commit

Permalink
xtensa: fix mb and wmb definitions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Max Filippov authored and Chris Zankel committed Dec 19, 2012
1 parent 71872b5 commit 599bf77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/xtensa/include/asm/barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2001 - 2005 Tensilica Inc.
* Copyright (C) 2001 - 2012 Tensilica Inc.
*/

#ifndef _XTENSA_SYSTEM_H
Expand All @@ -12,8 +12,8 @@
#define smp_read_barrier_depends() do { } while(0)
#define read_barrier_depends() do { } while(0)

#define mb() barrier()
#define rmb() mb()
#define mb() ({ __asm__ __volatile__("memw" : : : "memory"); })
#define rmb() barrier()
#define wmb() mb()

#ifdef CONFIG_SMP
Expand Down

0 comments on commit 599bf77

Please sign in to comment.