X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Ftypes.h;h=6f75be4253786888b7717febfadc74a22afb29d3;hb=2e7eb12e5c81dedaff12b0cea2341dc681d8c726;hp=df4808fcdf45578b502ba25e7b287689461acb92;hpb=b15cbc0be004d352d4dd661546847bd52fbf8a28;p=u-boot diff --git a/include/linux/types.h b/include/linux/types.h index df4808fcdf..6f75be4253 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -1,12 +1,9 @@ #ifndef _LINUX_TYPES_H #define _LINUX_TYPES_H -#ifdef __KERNEL__ -#include -#endif - #include #include +#include #ifndef __KERNEL_STRICT_NAMES @@ -107,7 +104,8 @@ typedef __u8 uint8_t; typedef __u16 uint16_t; typedef __u32 uint32_t; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \ + (!defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)) typedef __u64 uint64_t; typedef __u64 u_int64_t; typedef __s64 int64_t; @@ -115,10 +113,44 @@ typedef __s64 int64_t; #endif /* __KERNEL_STRICT_NAMES */ +/* this is a special 64bit data type that is 8-byte aligned */ +#define aligned_u64 __u64 __aligned(8) +#define aligned_be64 __be64 __aligned(8) +#define aligned_le64 __le64 __aligned(8) + +#if defined(CONFIG_USE_STDINT) && defined(__INT64_TYPE__) +typedef __UINT64_TYPE__ uint64_t; +typedef __UINT64_TYPE__ u_int64_t; +typedef __INT64_TYPE__ int64_t; +#endif + /* * Below are truly Linux-specific types that should never collide with * any application/library that wants linux/types.h. */ +#ifdef __CHECKER__ +#define __bitwise__ __attribute__((bitwise)) +#else +#define __bitwise__ +#endif +#ifdef __CHECK_ENDIAN__ +#define __bitwise __bitwise__ +#else +#define __bitwise +#endif + +typedef __u16 __bitwise __le16; +typedef __u16 __bitwise __be16; +typedef __u32 __bitwise __le32; +typedef __u32 __bitwise __be32; +#if defined(__GNUC__) +typedef __u64 __bitwise __le64; +typedef __u64 __bitwise __be64; +#endif +typedef __u16 __bitwise __sum16; +typedef __u32 __bitwise __wsum; + +typedef unsigned __bitwise__ gfp_t; struct ustat { __kernel_daddr_t f_tfree;