Files
linux/arch/s390/include/asm/rwonce.h
Heiko Carstens 4335edb713 s390: Remove superfluous newlines from inline assemblies
Remove superfluous newlines from inline assemblies. Compilers use the
number of lines of inline assemblies as heuristic for the complexity
and inline decisions. Therefore inline assemblies should only contain
as many lines as required.

A lot of inline assemblies contain a superfluous newline for the last
line. Remove such newlines to improve compiler inlining decisions.

Suggested-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2025-09-29 13:52:08 +02:00

32 lines
689 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_S390_RWONCE_H
#define __ASM_S390_RWONCE_H
#include <linux/compiler_types.h>
/*
* Use READ_ONCE_ALIGNED_128() for 128-bit block concurrent (atomic) read
* accesses. Note that x must be 128-bit aligned, otherwise a specification
* exception is generated.
*/
#define READ_ONCE_ALIGNED_128(x) \
({ \
union { \
typeof(x) __x; \
__uint128_t val; \
} __u; \
\
BUILD_BUG_ON(sizeof(x) != 16); \
asm volatile( \
" lpq %[val],%[_x]" \
: [val] "=d" (__u.val) \
: [_x] "QS" (x) \
: "memory"); \
__u.__x; \
})
#include <asm-generic/rwonce.h>
#endif /* __ASM_S390_RWONCE_H */