[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libfdt: fixup libfdt_env.h for xen



# HG changeset patch
# User David Vrabel <david.vrabel@xxxxxxxxxx>
# Date 1329140048 0
# Node ID e060d1bd7b60556fde01873aaaf3d8e4c298a5d2
# Parent  fcc188f21e471d2e9eaf1ddf22a728763a84cca2
libfdt: fixup libfdt_env.h for xen

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r fcc188f21e47 -r e060d1bd7b60 xen/common/libfdt/libfdt_env.h
--- a/xen/common/libfdt/libfdt_env.h    Mon Feb 13 13:33:26 2012 +0000
+++ b/xen/common/libfdt/libfdt_env.h    Mon Feb 13 13:34:08 2012 +0000
@@ -1,23 +1,16 @@
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
-#include <stddef.h>
-#include <stdint.h>
-#include <string.h>
+#include <xen/config.h>
+#include <xen/types.h>
+#include <xen/string.h>
+#include <asm/byteorder.h>
 
-#define _B(n)  ((unsigned long long)((uint8_t *)&x)[n])
-static inline uint32_t fdt32_to_cpu(uint32_t x)
-{
-       return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3);
-}
-#define cpu_to_fdt32(x) fdt32_to_cpu(x)
-
-static inline uint64_t fdt64_to_cpu(uint64_t x)
-{
-       return (_B(0) << 56) | (_B(1) << 48) | (_B(2) << 40) | (_B(3) << 32)
-               | (_B(4) << 24) | (_B(5) << 16) | (_B(6) << 8) | _B(7);
-}
-#define cpu_to_fdt64(x) fdt64_to_cpu(x)
-#undef _B
+#define fdt16_to_cpu(x) be16_to_cpu(x)
+#define cpu_to_fdt16(x) cpu_to_be16(x)
+#define fdt32_to_cpu(x) be32_to_cpu(x)
+#define cpu_to_fdt32(x) cpu_to_be32(x)
+#define fdt64_to_cpu(x) be64_to_cpu(x)
+#define cpu_to_fdt64(x) cpu_to_be64(x)
 
 #endif /* _LIBFDT_ENV_H */
diff -r fcc188f21e47 -r e060d1bd7b60 xen/include/xen/types.h
--- a/xen/include/xen/types.h   Mon Feb 13 13:33:26 2012 +0000
+++ b/xen/include/xen/types.h   Mon Feb 13 13:34:08 2012 +0000
@@ -57,4 +57,6 @@
 typedef __u64 __le64;
 typedef __u64 __be64;
 
+typedef unsigned long uintptr_t;
+
 #endif /* __TYPES_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.