• Martin Schwidefsky's avatar
    s390/spinlock: add niai spinlock hints · 7f7e6e28
    Martin Schwidefsky authored
    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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    7f7e6e28
spinlock.c 5.63 KB