]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures
authorWill Deacon <will@kernel.org>
Fri, 26 Jun 2026 14:17:28 +0000 (15:17 +0100)
committerWill Deacon <will@kernel.org>
Tue, 21 Jul 2026 21:53:02 +0000 (21:53 +0000)
The arm64 UAPI exposes some 128-bit integer types to represent things
such as fpsimd registers in the sigcontext. In preparation for defining
these using the '__u128' typedef implemented by uapi/linux/types.h, copy
that typedef over to the private linux/types.h header used by the tools
directory.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Matlack <dmatlack@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
tools/include/linux/types.h

index d41f8a261bce82faa1704a1ca551ebf76a54b018..b6c473b7920db0e6c7cdeade0a2383525fdcf386 100644 (file)
@@ -23,6 +23,11 @@ typedef enum {
        __GFP_HIGH
 } gfp_t;
 
+#ifdef __SIZEOF_INT128__
+typedef __signed__ __int128 __s128 __attribute__((aligned(16)));
+typedef unsigned __int128 __u128 __attribute__((aligned(16)));
+#endif
+
 /*
  * We define u64 as uint64_t for every architecture
  * so that we can print it with "%"PRIx64 without getting warnings.