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

[Xen-devel] [PATCH 7 of 8] [powerpc] add PowerPC support to libxc



# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1152744261 18000
# Node ID 8400d02096faf9fd566c9ea73a57811ac5d34acd
# Parent  d3533a195a15902ad8b7bd0b9118118fae18e79c
[powerpc] add PowerPC support to libxc
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r d3533a195a15 -r 8400d02096fa tools/libxc/Makefile
--- a/tools/libxc/Makefile      Wed Jul 12 17:42:46 2006 -0500
+++ b/tools/libxc/Makefile      Wed Jul 12 17:44:21 2006 -0500
@@ -26,11 +26,13 @@ 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_PLAN9) += xc_load_aout9.c
 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
 GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
 
diff -r d3533a195a15 -r 8400d02096fa tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Wed Jul 12 17:42:46 2006 -0500
+++ b/tools/libxc/xc_load_elf.c Wed Jul 12 17:44:21 2006 -0500
@@ -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 d3533a195a15 -r 8400d02096fa tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Wed Jul 12 17:42:46 2006 -0500
+++ b/tools/libxc/xenctrl.h     Wed Jul 12 17:44:21 2006 -0500
@@ -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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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