mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
47b4d562b6
commit
8f4fc2d2bc
3 files changed
+14
No files matched your search
@@ -0,0 +1,6 @@
|
||||
#ifndef __ASM_SPINLOCK_H
|
||||
#define __ASM_SPINLOCK_H
|
||||
|
||||
/* Nothing ARM specific. */
|
||||
|
||||
#endif /* __ASM_SPINLOCK_H */
|
||||
@@ -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 */
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __SPINLOCK_H__
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/spinlock.h>
|
||||
|
||||
#ifndef NDEBUG
|
||||
struct lock_debug {
|
||||
|
||||