OSDN Git Service

s390/rwonce: add READ_ONCE_ALIGNED_128() macro
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 24 Feb 2023 10:02:36 +0000 (11:02 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 28 Feb 2023 12:19:05 +0000 (13:19 +0100)
commit434b26605f6cc500c1a995587e5c4bc4bc1693c6
tree6a8fc7fdd6f59486387ce18a1e325e8247457f71
parentebf95e884694b2c796ecb53d80d2b4cff8990d2f
s390/rwonce: add READ_ONCE_ALIGNED_128() macro

Add an s390 specific READ_ONCE_ALIGNED_128() helper, which can be used for
fast block concurrent (atomic) 128-bit accesses.

The used lpq instruction requires 128-bit alignment. This is also the
reason why the compiler doesn't emit this instruction if __READ_ONCE() is
used for 128-bit accesses.

Link: https://lore.kernel.org/r/20230224100237.3247871-2-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/rwonce.h [new file with mode: 0644]