patch-2.3.16 linux/include/asm-sparc64/spinlock.h
Next file: linux/include/asm-sparc64/sunbpp.h
Previous file: linux/include/asm-sparc64/scatterlist.h
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Tue Aug 31 11:23:30 1999
- Orig file:
v2.3.15/linux/include/asm-sparc64/spinlock.h
- Orig date:
Mon Aug 2 22:07:16 1999
diff -u --recursive --new-file v2.3.15/linux/include/asm-sparc64/spinlock.h linux/include/asm-sparc64/spinlock.h
@@ -152,6 +152,7 @@
{
__asm__ __volatile__("membar #StoreStore | #LoadStore\n\t"
"stb %%g0, [%0]\n\t"
+ "membar #StoreStore | #StoreLoad"
: /* No outputs */
: "r" (lock)
: "memory");
@@ -177,13 +178,13 @@
extern __inline__ void spin_unlock_irq(spinlock_t *lock)
{
- __asm__ __volatile__("
- membar #StoreStore | #LoadStore
- stb %%g0, [%0]
- wrpr %%g0, 0x0, %%pil
-" : /* no outputs */
- : "r" (lock)
- : "memory");
+ __asm__ __volatile__("membar #StoreStore | #LoadStore\n\t"
+ "stb %%g0, [%0]\n\t"
+ "membar #StoreStore | #StoreLoad\n\t"
+ "wrpr %%g0, 0x0, %%pil"
+ : /* no outputs */
+ : "r" (lock)
+ : "memory");
}
#define spin_lock_bh(__lock) \
@@ -218,13 +219,13 @@
extern __inline__ void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
{
- __asm__ __volatile__("
- membar #StoreStore | #LoadStore
- stb %%g0, [%0]
- wrpr %1, 0x0, %%pil
-" : /* no outputs */
- : "r" (lock), "r" (flags)
- : "memory");
+ __asm__ __volatile__("membar #StoreStore | #LoadStore\n\t"
+ "stb %%g0, [%0]\n\t"
+ "membar #StoreStore | #StoreLoad\n\t"
+ "wrpr %1, 0x0, %%pil"
+ : /* no outputs */
+ : "r" (lock), "r" (flags)
+ : "memory");
}
#else /* !(SPIN_LOCK_DEBUG) */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)