1 /* rwsem.S: RW semaphore assembler.
3 * Written by David S. Miller (davem@redhat.com), 2001.
4 * Derived from asm-i386/rwsem.h
7 #include <asm/rwsem-const.h>
9 .section .sched.text, "ax"
27 call rwsem_down_read_failed
31 .size __down_read, .-__down_read
33 .globl __down_read_trylock
46 .size __down_read_trylock, .-__down_read_trylock
50 sethi %hi(RWSEM_ACTIVE_WRITE_BIAS), %g1
51 or %g1, %lo(RWSEM_ACTIVE_WRITE_BIAS), %g1
65 call rwsem_down_write_failed
69 .size __down_write, .-__down_write
71 .globl __down_write_trylock
73 sethi %hi(RWSEM_ACTIVE_WRITE_BIAS), %g1
74 or %g1, %lo(RWSEM_ACTIVE_WRITE_BIAS), %g1
87 .size __down_write_trylock, .-__down_write_trylock
102 3: sethi %hi(RWSEM_ACTIVE_MASK), %g1
104 or %g1, %lo(RWSEM_ACTIVE_MASK), %g1
113 .size __up_read, .-__up_read
117 sethi %hi(RWSEM_ACTIVE_WRITE_BIAS), %g1
118 or %g1, %lo(RWSEM_ACTIVE_WRITE_BIAS), %g1
138 .size __up_write, .-__up_write
140 .globl __downgrade_write
142 sethi %hi(RWSEM_WAITING_BIAS), %g1
143 or %g1, %lo(RWSEM_WAITING_BIAS), %g1
159 call rwsem_downgrade_wake
163 .size __downgrade_write, .-__downgrade_write