[tip:x86/spinlocks] x86, ticketlock: Use asm volatile for __ticket_unlock_release()
From: tip-bot for H. Peter Anvin
Date: Fri Jul 22 2011 - 15:56:49 EST
Commit-ID: 26056c822f9428ddc95fd7ac3008bbb0032d1086
Gitweb: http://git.kernel.org/tip/26056c822f9428ddc95fd7ac3008bbb0032d1086
Author: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
AuthorDate: Fri, 22 Jul 2011 11:15:20 -0700
Committer: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
CommitDate: Fri, 22 Jul 2011 11:15:20 -0700
x86, ticketlock: Use asm volatile for __ticket_unlock_release()
__ticket_uplock_release() really should have barrier semantics, so use
"asm volatile" there.
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/4E050704.3070409@xxxxxxxxx
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
---
arch/x86/include/asm/spinlock.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
index 704b0c3..f8d51dc 100644
--- a/arch/x86/include/asm/spinlock.h
+++ b/arch/x86/include/asm/spinlock.h
@@ -36,11 +36,11 @@
static __always_inline void __ticket_unlock_release(struct arch_spinlock *lock)
{
if (sizeof(lock->tickets.head) == sizeof(u8))
- asm (LOCK_PREFIX "incb %0"
- : "+m" (lock->tickets.head) : : "memory");
+ asm volatile(LOCK_PREFIX "incb %0"
+ : "+m" (lock->tickets.head) : : "memory");
else
- asm (LOCK_PREFIX "incw %0"
- : "+m" (lock->tickets.head) : : "memory");
+ asm volatile(LOCK_PREFIX "incw %0"
+ : "+m" (lock->tickets.head) : : "memory");
}
#else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/