1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _TOOLS_LINUX_TYPES_H_
3 #define _TOOLS_LINUX_TYPES_H_
9 #ifndef __SANE_USERSPACE_TYPES__
10 #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
13 #include <asm/types.h>
14 #include <asm/posix_types.h>
27 * We define u64 as uint64_t for every architecture
28 * so that we can print it with "%"PRIx64 without getting warnings.
46 #define __bitwise __attribute__((bitwise))
52 /* This is defined in linux/compiler_types.h and is left for backward
61 typedef __u16 __bitwise __le16;
62 typedef __u16 __bitwise __be16;
63 typedef __u32 __bitwise __le32;
64 typedef __u32 __bitwise __be32;
65 typedef __u64 __bitwise __le64;
66 typedef __u64 __bitwise __be64;
68 typedef __u16 __bitwise __sum16;
69 typedef __u32 __bitwise __wsum;
71 #ifdef CONFIG_PHYS_ADDR_T_64BIT
72 typedef u64 phys_addr_t;
74 typedef u32 phys_addr_t;
86 # define __aligned_u64 __u64 __attribute__((aligned(8)))
90 struct list_head *next, *prev;
94 struct hlist_node *first;
98 struct hlist_node *next, **pprev;
101 #endif /* _TOOLS_LINUX_TYPES_H_ */