git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] paravirt: Patch inline replacements for paravirt intercepts
[safe/jmp/linux-2.6]
/
include
/
asm-i386
/
spinlock.h
diff --git
a/include/asm-i386/spinlock.h
b/include/asm-i386/spinlock.h
index
dea6070
..
d3bcebe
100644
(file)
--- a/
include/asm-i386/spinlock.h
+++ b/
include/asm-i386/spinlock.h
@@
-12,6
+12,8
@@
#else
#define CLI_STRING "cli"
#define STI_STRING "sti"
#else
#define CLI_STRING "cli"
#define STI_STRING "sti"
+#define CLI_STI_CLOBBERS
+#define CLI_STI_INPUT_ARGS
#endif /* CONFIG_PARAVIRT */
/*
#endif /* CONFIG_PARAVIRT */
/*
@@
-57,25
+59,28
@@
static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla
{
asm volatile(
"\n1:\t"
{
asm volatile(
"\n1:\t"
- LOCK_PREFIX " ; decb %
0
\n\t"
+ LOCK_PREFIX " ; decb %
[slock]
\n\t"
"jns 5f\n"
"2:\t"
"jns 5f\n"
"2:\t"
- "testl $0x200, %
1
\n\t"
+ "testl $0x200, %
[flags]
\n\t"
"jz 4f\n\t"
STI_STRING "\n"
"3:\t"
"rep;nop\n\t"
"jz 4f\n\t"
STI_STRING "\n"
"3:\t"
"rep;nop\n\t"
- "cmpb $0, %
0
\n\t"
+ "cmpb $0, %
[slock]
\n\t"
"jle 3b\n\t"
CLI_STRING "\n\t"
"jmp 1b\n"
"4:\t"
"rep;nop\n\t"
"jle 3b\n\t"
CLI_STRING "\n\t"
"jmp 1b\n"
"4:\t"
"rep;nop\n\t"
- "cmpb $0, %
0
\n\t"
+ "cmpb $0, %
[slock]
\n\t"
"jg 1b\n\t"
"jmp 4b\n"
"5:\n\t"
"jg 1b\n\t"
"jmp 4b\n"
"5:\n\t"
- : "+m" (lock->slock) : "r" (flags) : "memory");
+ : [slock] "+m" (lock->slock)
+ : [flags] "r" (flags)
+ CLI_STI_INPUT_ARGS
+ : "memory" CLI_STI_CLOBBERS);
}
#endif
}
#endif