1 /* Slow paths of read/write spinlocks. */
3 #include <linux/linkage.h>
4 #include <asm/alternative-asm.h>
6 #include <asm/rwlock.h>
9 # define __lock_ptr eax
11 # define __lock_ptr rdi
14 ENTRY(__write_lock_failed)
18 WRITE_LOCK_ADD($RW_LOCK_BIAS) (%__lock_ptr)
20 cmpl $WRITE_LOCK_CMP, (%__lock_ptr)
23 WRITE_LOCK_SUB($RW_LOCK_BIAS) (%__lock_ptr)
28 END(__write_lock_failed)
30 ENTRY(__read_lock_failed)
34 READ_LOCK_SIZE(inc) (%__lock_ptr)
36 READ_LOCK_SIZE(cmp) $1, (%__lock_ptr)
39 READ_LOCK_SIZE(dec) (%__lock_ptr)
44 END(__read_lock_failed)