Skip to content

Commit c156a75

Browse files
Peter Zijlstragregkh
authored andcommitted
openrisc: Define memory barrier mb
[ Upstream commit 8b549c18ae81dbc36fb11e4aa08b8378c599ca95 ] 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 <[email protected]> [[email protected]:Turned the mail into a patch] Signed-off-by: Stafford Horne <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent ac17128 commit c156a75

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
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)