Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
/*********************************************************
- * 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
LOGLEVEL_VAR(serial), \
LOGLEVEL_VAR(parallel), \
LOGLEVEL_VAR(chipset), \
+ LOGLEVEL_VAR(smram), \
LOGLEVEL_VAR(smc), \
LOGLEVEL_VAR(ich7m), \
LOGLEVEL_VAR(hpet), \
* 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.
*
*-----------------------------------------------------------------------------
*/
: "cc"
);
AtomicEpilogue();
+ if (val != oldVal) {
+ /* Leave transactional execution mode if TSX enabled. */
+ __asm__ __volatile__("pause");
+ }
return val;
#else
return Atomic_ReadIfEqualWrite(var, oldVal, newVal);