]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common header file not applicable to open-vm-tools.
authorKruti <kpendharkar@vmware.com>
Mon, 18 Mar 2024 18:03:49 +0000 (11:03 -0700)
committerKruti <kpendharkar@vmware.com>
Mon, 18 Mar 2024 18:03:49 +0000 (11:03 -0700)
open-vm-tools/lib/include/vm_basic_asm_arm64.h

index 88faddbfb8eafcb8f026876aba0459340276cd1f..18908ba2c10ae77a33c2c59a3441301c773b0f3e 100644 (file)
@@ -244,7 +244,18 @@ ESB(void)
  * Thanks for pasting this whole comment into every architecture header.
  */
 
-#define COMPILER_MEM_BARRIER()   SMP_RW_BARRIER_RW()
+/*
+ * To match x86 TSO semantics, we need to guarantee ordering for
+ * everything _except_ store-load:
+ *
+ * - DMB ISHLD orders load-load and load-store.
+ * - DMB ISHST orders store-store.
+ *
+ * In contrast, SMP_RW_BARRIER_RW, or DMB ISH, orders all four
+ * (load-load, load-store, store-load, store-store), so it's stronger
+ * than we need -- like x86 MFENCE.
+ */
+#define COMPILER_MEM_BARRIER() do { _DMB(ISHLD); _DMB(ISHST); } while (0)
 
 /*
  * Memory barriers. These take the form of