* [U-Boot] [PATCH] armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases
@ 2014-01-09 20:11 Tom Rini
2014-01-10 9:17 ` Albert ARIBAUD
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2014-01-09 20:11 UTC (permalink / raw)
To: u-boot
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 <fenghua@phytium.com.cn>
Signed-off-by: Tom Rini <trini@ti.com>
---
arch/arm/include/asm/byteorder.h | 14 +-------------
arch/arm/include/asm/posix_types.h | 6 +++---
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h
index 71a9966..20cce76 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 <linux/byteorder/big_endian.h>
-#else
-#include <linux/byteorder/little_endian.h>
-#endif
-
-#else /* CONFIG_ARM64 */
-
-#ifdef __ARMEB__
+#if defined(__ARMEB__) || defined(__AARCH64EB__)
#include <linux/byteorder/big_endian.h>
#else
#include <linux/byteorder/little_endian.h>
#endif
-#endif /* CONFIG_ARM64 */
-
#endif
diff --git a/arch/arm/include/asm/posix_types.h b/arch/arm/include/asm/posix_types.h
index 9ba9add..fe4483f 100644
--- a/arch/arm/include/asm/posix_types.h
+++ b/arch/arm/include/asm/posix_types.h
@@ -31,15 +31,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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases
2014-01-09 20:11 [U-Boot] [PATCH] armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases Tom Rini
@ 2014-01-10 9:17 ` Albert ARIBAUD
0 siblings, 0 replies; 2+ messages in thread
From: Albert ARIBAUD @ 2014-01-10 9:17 UTC (permalink / raw)
To: u-boot
Hi Tom,
On Thu, 9 Jan 2014 15:11:27 -0500, Tom Rini <trini@ti.com> wrote:
> 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.
Amended according to Tom's instruction on IRC (actual removal of
config.h include in posix_types.h) then applied on top of the arm64
serie v16.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-10 9:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 20:11 [U-Boot] [PATCH] armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases Tom Rini
2014-01-10 9:17 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).