]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Wed, 18 Sep 2013 03:30:26 +0000 (20:30 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Sep 2013 05:13:29 +0000 (22:13 -0700)
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/include/loglevel_user.h
open-vm-tools/lib/include/vm_atomic.h

index 3dec8d3ea0186d2556779c57a6526069972d817e..ef247618812ab5b96c90c9df23c6acd21b23c8ba 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2003 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2013 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -57,6 +57,7 @@
    LOGLEVEL_VAR(serial), \
    LOGLEVEL_VAR(parallel), \
    LOGLEVEL_VAR(chipset), \
+   LOGLEVEL_VAR(smram), \
    LOGLEVEL_VAR(smc), \
    LOGLEVEL_VAR(ich7m), \
    LOGLEVEL_VAR(hpet), \
index af2f578cf5f69733cc833b437d2bf1b629a5ed5a..2a983c7d9c6b9dc6c159a1800d7aa46eb0a21178 100644 (file)
@@ -623,7 +623,9 @@ Atomic_ReadIfEqualWrite(Atomic_uint32 *var, // IN
  *      The value of the atomic variable before the write.
  *
  * Side effects:
- *      The variable may be modified.
+ *      The atomic variable may be modified.
+ *      May return in transactional execution mode on TSX enabled CPUs
+ *      IFF the atomic variable is modified.
  *
  *-----------------------------------------------------------------------------
  */
@@ -644,6 +646,10 @@ Atomic_ReadIfEqualWriteLockAcquire(Atomic_uint32 *var, // IN
       : "cc"
    );
    AtomicEpilogue();
+   if (val != oldVal) {
+      /* Leave transactional execution mode if TSX enabled. */
+      __asm__ __volatile__("pause");
+   }
    return val;
 #else
    return Atomic_ReadIfEqualWrite(var, oldVal, newVal);