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

[Xen-changelog] [xen-unstable] [powerpc] add PowerPC support to libxc



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 80055bb36dc7d36aac094374d3a5987ce7520cd4
# Parent  129e981a770013543c96b73eff338e4801badd4d
[powerpc] add PowerPC support to libxc
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 tools/libxc/Makefile      |    5 +++--
 tools/libxc/xc_load_elf.c |    4 ++++
 tools/libxc/xenctrl.h     |    5 +++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff -r 129e981a7700 -r 80055bb36dc7 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Fri Jul 14 10:31:36 2006 +0100
+++ b/tools/libxc/Makefile      Fri Jul 14 10:37:12 2006 +0100
@@ -26,11 +26,12 @@ CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
 CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
 
 GUEST_SRCS-y :=
-GUEST_SRCS-y += xc_linux_build.c
 GUEST_SRCS-y += xc_load_bin.c
 GUEST_SRCS-y += xc_load_elf.c
 GUEST_SRCS-y += xg_private.c
-GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c
+GUEST_SRCS-$(CONFIG_POWERPC) += xc_ppc_linux_build.c
+GUEST_SRCS-$(CONFIG_X86) += xc_linux_build.c
+GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c xc_linux_build.c
 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
 GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
 
diff -r 129e981a7700 -r 80055bb36dc7 tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Fri Jul 14 10:31:36 2006 +0100
+++ b/tools/libxc/xc_load_elf.c Fri Jul 14 10:37:12 2006 +0100
@@ -38,6 +38,10 @@ loadelfsymtab(
 #define ELFCLASS   ELFCLASS64
 #define ELFDATA    ELFDATA2LSB
 #define ELFMACHINE EM_X86_64
+#elif defined(__powerpc__)
+#define ELFCLASS   ELFCLASS64
+#define ELFDATA    ELFDATA2MSB
+#define ELFMACHINE EM_PPC64
 #endif
 
 int probe_elf(const char *image,
diff -r 129e981a7700 -r 80055bb36dc7 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Fri Jul 14 10:31:36 2006 +0100
+++ b/tools/libxc/xenctrl.h     Fri Jul 14 10:37:12 2006 +0100
@@ -47,6 +47,11 @@
 #define mb()
 #define rmb()
 #define wmb()
+#elif defined(__powerpc__)
+/* XXX loosen these up later */
+#define mb()   __asm__ __volatile__ ("sync" : : : "memory")
+#define rmb()  __asm__ __volatile__ ("sync" : : : "memory") /* lwsync? */
+#define wmb()  __asm__ __volatile__ ("sync" : : : "memory") /* eieio? */
 #else
 #error "Define barriers"
 #endif

_______________________________________________
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®.