mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
s390/spinlock: Generate shorter code for arch_spin_unlock()
Use mvhhi instead of sth to write a zero to spinlocks. Compared to the sth variant this avoids the load of zero to a register, and reduces register pressure. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
2c3bc137f1
commit
1200f216a3
|
|
@ -82,9 +82,9 @@ static inline void arch_spin_unlock(arch_spinlock_t *lp)
|
|||
kcsan_release();
|
||||
asm_inline volatile(
|
||||
ALTERNATIVE("nop", ".insn rre,0xb2fa0000,7,0", ALT_FACILITY(49)) /* NIAI 7 */
|
||||
" sth %[zero],%[lock]\n"
|
||||
: [lock] "=R" (((unsigned short *)&lp->lock)[1])
|
||||
: [zero] "d" (0)
|
||||
" mvhhi %[lock],0\n"
|
||||
: [lock] "=Q" (((unsigned short *)&lp->lock)[1])
|
||||
:
|
||||
: "memory");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user