X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsparc64%2Flib%2Fdebuglocks.c;h=46e5ebfb4b7cebf749381cc4b1295dfd8cd4d3a8;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9fb4dedc89e13934f84bf093bde4ca2145f01825;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/sparc64/lib/debuglocks.c b/arch/sparc64/lib/debuglocks.c index 9fb4dedc8..46e5ebfb4 100644 --- a/arch/sparc64/lib/debuglocks.c +++ b/arch/sparc64/lib/debuglocks.c @@ -172,6 +172,7 @@ void _do_read_unlock (rwlock_t *rw, char *str) runlock_again: /* Spin trying to decrement the counter using casx. */ __asm__ __volatile__( +" membar #StoreLoad | #LoadLoad\n" " ldx [%0], %%g5\n" " sub %%g5, 1, %%g7\n" " casx [%0], %%g5, %%g7\n" @@ -290,6 +291,7 @@ void _do_write_unlock(rwlock_t *rw) current->thread.smp_lock_count--; wlock_again: __asm__ __volatile__( +" membar #StoreLoad | #LoadLoad\n" " mov 1, %%g3\n" " sllx %%g3, 63, %%g3\n" " ldx [%0], %%g5\n"