Skip to content

Commit 385abe8

Browse files
committed
atomics/powerpc: Fix WMB instruction
* `lwsync` is a write memory barrier. - `eieio` is really not meant for this type of operation. * `lwsync` can also be used for the read memory barrier according to my reading of the of the Power 8 ISA docs (v2.07) - https://www-01.ibm.com/marketing/iwm/iwm/web/reg/download.do?source=swg-opower&S_PKG=dl&lang=en_US&cp=UTF-8 * References openpmix/openpmix#391 Signed-off-by: Joshua Hursey <[email protected]> (cherry picked from commit 4796193) Signed-off-by: Joshua Hursey <[email protected]>
1 parent 7588e86 commit 385abe8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

opal/include/opal/sys/powerpc/atomic.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2010 IBM Corporation. All rights reserved.
13+
* Copyright (c) 2010-2017 IBM Corporation. All rights reserved.
1414
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* $COPYRIGHT$
@@ -29,10 +29,8 @@
2929

3030
#define MB() __asm__ __volatile__ ("sync" : : : "memory")
3131
#define RMB() __asm__ __volatile__ ("lwsync" : : : "memory")
32-
#define WMB() __asm__ __volatile__ ("eieio" : : : "memory")
32+
#define WMB() __asm__ __volatile__ ("lwsync" : : : "memory")
3333
#define ISYNC() __asm__ __volatile__ ("isync" : : : "memory")
34-
#define SMP_SYNC "sync \n\t"
35-
#define SMP_ISYNC "\n\tisync"
3634

3735

3836
/**********************************************************************

0 commit comments

Comments
 (0)