From: Tom Rini Date: Thu, 9 Jan 2014 20:11:27 +0000 (-0500) Subject: armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=795611e6ffb7d95c2a4529f365953bead0ccd13f;p=u-boot.git armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases The toolchain sets __aarch64__ for both LE and BE. In the case of posix_types.h we cannot reliably use config.h as that will lead to problems. In the case of byteorder.h it's clearer to check the EB flag being set in either case instead. Cc: David Feng Signed-off-by: Tom Rini Amended by Albert ARIBAUD to actually remove the config.h include from the posix_types.h files, with permission from Tom Rini. --- diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h index 71a9966301..20cce7657e 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h @@ -23,22 +23,10 @@ # define __SWAB_64_THRU_32__ #endif -#ifdef CONFIG_ARM64 - -#ifdef __AARCH64EB__ -#include -#else -#include -#endif - -#else /* CONFIG_ARM64 */ - -#ifdef __ARMEB__ +#if defined(__ARMEB__) || defined(__AARCH64EB__) #include #else #include #endif -#endif /* CONFIG_ARM64 */ - #endif diff --git a/arch/arm/include/asm/posix_types.h b/arch/arm/include/asm/posix_types.h index 9ba9add4f7..d254b95b2a 100644 --- a/arch/arm/include/asm/posix_types.h +++ b/arch/arm/include/asm/posix_types.h @@ -13,8 +13,6 @@ #ifndef __ARCH_ARM_POSIX_TYPES_H #define __ARCH_ARM_POSIX_TYPES_H -#include - /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot @@ -31,15 +29,15 @@ typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; -#ifdef CONFIG_ARM64 +#ifdef __aarch64__ typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; typedef long __kernel_ptrdiff_t; -#else /* CONFIG_ARM64 */ +#else typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; -#endif /* CONFIG_ARM64 */ +#endif typedef long __kernel_time_t; typedef long __kernel_suseconds_t;