1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #include <asm/byteorder.h> 13 14 #define CFI_HOST_ENDIAN 15 16 #ifdef CFI_LITTLE_ENDIAN 17 #define cpu_to_cfi8(x) (x) 18 #define cfi8_to_cpu(x) (x) 19 #define cpu_to_cfi16(x) cpu_to_le16(x) 20 #define cpu_to_cfi32(x) cpu_to_le32(x) 21 #define cpu_to_cfi64(x) cpu_to_le64(x) 22 #define cfi16_to_cpu(x) le16_to_cpu(x) 23 #define cfi32_to_cpu(x) le32_to_cpu(x) 24 #define cfi64_to_cpu(x) le64_to_cpu(x) 25 #elif defined (CFI_BIG_ENDIAN) 26 #define cpu_to_cfi8(x) (x) 27 #define cfi8_to_cpu(x) (x) 28 #define cpu_to_cfi16(x) cpu_to_be16(x) 29 #define cpu_to_cfi32(x) cpu_to_be32(x) 30 #define cpu_to_cfi64(x) cpu_to_be64(x) 31 #define cfi16_to_cpu(x) be16_to_cpu(x) 32 #define cfi32_to_cpu(x) be32_to_cpu(x) 33 #define cfi64_to_cpu(x) be64_to_cpu(x) 34 #elif defined (CFI_HOST_ENDIAN) 35 #define cpu_to_cfi8(x) (x) 36 #define cfi8_to_cpu(x) (x) 37 #define cpu_to_cfi16(x) (x) 38 #define cpu_to_cfi32(x) (x) 39 #define cpu_to_cfi64(x) (x) 40 #define cfi16_to_cpu(x) (x) 41 #define cfi32_to_cpu(x) (x) 42 #define cfi64_to_cpu(x) (x) 43 #else 44 #error No CFI endianness defined 45 #endif 46