From 0ae7653128c80a4f2920cbe9b124792c2fd9d9e0 Mon Sep 17 00:00:00 2001 From: David Feng Date: Sat, 14 Dec 2013 11:47:35 +0800 Subject: arm64: core support Relocation code based on a patch by Scott Wood, which is: Signed-off-by: Scott Wood Signed-off-by: David Feng --- arch/arm/include/asm/byteorder.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/include/asm/byteorder.h') diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h index c3489f1e1f..71a9966301 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h @@ -23,10 +23,22 @@ # define __SWAB_64_THRU_32__ #endif +#ifdef CONFIG_ARM64 + +#ifdef __AARCH64EB__ +#include +#else +#include +#endif + +#else /* CONFIG_ARM64 */ + #ifdef __ARMEB__ #include #else #include #endif +#endif /* CONFIG_ARM64 */ + #endif -- cgit From 795611e6ffb7d95c2a4529f365953bead0ccd13f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 9 Jan 2014 15:11:27 -0500 Subject: 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. --- arch/arm/include/asm/byteorder.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'arch/arm/include/asm/byteorder.h') 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 -- cgit