]> asedeno.scripts.mit.edu Git - linux.git/commit
s390/spinlock: add niai spinlock hints
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 19 Apr 2017 12:54:05 +0000 (14:54 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 26 Jul 2017 06:25:23 +0000 (08:25 +0200)
commit7f7e6e28cd3285ce5d5a3d88b334eda428dd7d66
tree4d9a8c81ee58e2b965f68322e66e894a6522f44a
parent8351378f5873164ecc966c58fac43bab53216c94
s390/spinlock: add niai spinlock hints

The z14 machine introduces new mode of the next-instruction-access-intent
NIAI instruction. With NIAI-8 it is possible to pin a cache-line on a
CPU for a small amount of time, NIAI-7 releases the cache-line again.
Finally NIAI-4 can be used to prevent the CPU to speculatively access
memory beyond the compare-and-swap instruction to get the lock.

Use these instruction in the spinlock code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/spinlock.h
arch/s390/lib/spinlock.c