lkml.org 
[lkml]   [2011]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:x86/spinlocks] x86, ticketlock: Use asm volatile for __ticket_unlock_release()
Commit-ID:  26056c822f9428ddc95fd7ac3008bbb0032d1086
Gitweb: http://git.kernel.org/tip/26056c822f9428ddc95fd7ac3008bbb0032d1086
Author: H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Fri, 22 Jul 2011 11:15:20 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
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@citrix.com>
Link: http://lkml.kernel.org/r/4E050704.3070409@zytor.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
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

\
 
 \ /
  Last update: 2011-07-22 21:59    [W:0.212 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site