Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

+9 -2
+9 -2
arch/s390/include/uapi/asm/types.h
··· 19 19 typedef __signed__ long saddr_t; 20 20 21 21 typedef struct { 22 - __u32 u[4]; 23 - } __vector128; 22 + union { 23 + struct { 24 + __u64 high; 25 + __u64 low; 26 + }; 27 + __uint128_t v; 28 + __u32 u[4]; 29 + }; 30 + } __attribute__((packed, aligned(4))) __vector128; 24 31 25 32 #endif /* __ASSEMBLY__ */ 26 33