x86: reintroduce read_unlock() optimization

Commit 902d1b5c31 (x86,arm: remove
asm/spinlock.h from all architectures) inadvertantly removed an
x86-specific optimization for read_unlock*().

Re-add asm/spinlock.h to allow architectures to provide an optmized
_raw_read_unlock() and make x86 provide the previous implementation.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
This commit is contained in:
David Vrabel authored and Jan Beulich committed 2015-07-13 11:50:51 +02:00
1 parent 47b4d562b6
commit 8f4fc2d2bc
3 files changed
+14

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
#ifndef __ASM_SPINLOCK_H
#define __ASM_SPINLOCK_H
/* Nothing ARM specific. */
#endif /* __ASM_SPINLOCK_H */
+7
View File
@@ -0,0 +1,7 @@
#ifndef __ASM_SPINLOCK_H
#define __ASM_SPINLOCK_H
#define _raw_read_unlock(l) \
asm volatile ( "lock; dec%z0 %0" : "+m" ((l)->lock) :: "memory" )
#endif /* __ASM_SPINLOCK_H */
+1
View File
@@ -2,6 +2,7 @@
#define __SPINLOCK_H__
#include <asm/system.h>
#include <asm/spinlock.h>
#ifndef NDEBUG
struct lock_debug {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.