From b0b7b43fcc4666232b4ed65d2c8fa08aff1b6042 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Thu, 2 Feb 2023 15:47:38 +0100 Subject: s390/vx: add 64 and 128 bit members to __vector128 struct Add 64 and 128 bit members to __vector128 struct in order to allow reading of the complete value, or the higher or lower part of vector register contents instead of having to use casts. Add an explicit __aligned(4) statement to avoid that the alignment of the structure changes from 4 to 8. This should make sure that no breakage happens because of this change. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens --- arch/s390/include/uapi/asm/types.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'arch/s390/include/uapi') diff --git a/arch/s390/include/uapi/asm/types.h b/arch/s390/include/uapi/asm/types.h index da034c606314..57139590eb6b 100644 --- a/arch/s390/include/uapi/asm/types.h +++ b/arch/s390/include/uapi/asm/types.h @@ -19,8 +19,15 @@ typedef unsigned long addr_t; typedef __signed__ long saddr_t; typedef struct { - __u32 u[4]; -} __vector128; + union { + struct { + __u64 high; + __u64 low; + }; + __uint128_t v; + __u32 u[4]; + }; +} __attribute__((packed, aligned(4))) __vector128; #endif /* __ASSEMBLY__ */ -- cgit v1.2.3