tools/include: Add phys_addr_t to types.h
authorKarolina Drobnik <karolinadrobnik@gmail.com>
Wed, 2 Feb 2022 11:03:01 +0000 (12:03 +0100)
committerMike Rapoport <rppt@linux.ibm.com>
Sun, 20 Feb 2022 06:44:37 +0000 (08:44 +0200)
Update types.h file to include phys_addr_t typedef so it can
be used in testing.

Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/f0b42be7d1fe2eb9cd299532676d9df2df9ef089.1643796665.git.karolinadrobnik@gmail.com
tools/include/linux/types.h

index 6e14a533ab4e145b1a33c37474be8adcc4fc0997..35cedaf191e8a6fadbcd356e2ea6dd2c7ccaaba5 100644 (file)
@@ -64,6 +64,12 @@ typedef __u64 __bitwise __be64;
 typedef __u16 __bitwise __sum16;
 typedef __u32 __bitwise __wsum;
 
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
+typedef u64 phys_addr_t;
+#else
+typedef u32 phys_addr_t;
+#endif
+
 typedef struct {
        int counter;
 } atomic_t;