Skip to content

Commit 8b549c1

Browse files
Peter Zijlstrastffrdhrn
authored andcommitted
openrisc: Define memory barrier mb
This came up in the discussion of the requirements of qspinlock on an architecture. OpenRISC uses qspinlock, but it was noticed that the memmory barrier was not defined. Peter defined it in the mail thread writing: As near as I can tell this should do. The arch spec only lists this one instruction and the text makes it sound like a completion barrier. This is correct so applying this patch. Signed-off-by: Peter Zijlstra <peterz@infradead.org> [shorne@gmail.com:Turned the mail into a patch] Signed-off-by: Stafford Horne <shorne@gmail.com>
1 parent 371dcae commit 8b549c1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __ASM_BARRIER_H
3+
#define __ASM_BARRIER_H
4+
5+
#define mb() asm volatile ("l.msync" ::: "memory")
6+
7+
#include <asm-generic/barrier.h>
8+
9+
#endif /* __ASM_BARRIER_H */

0 commit comments

Comments
 (0)