All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0 of 8] common code changes for PowerPC merge
@ 2006-07-12 22:55 Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 1 of 8] [powerpc] add PowerPC files to .hgignore Hollis Blanchard
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

As requested, here are the broken-out changes to common code for the PowerPC
merge. These patches do not depend on each other.

-- 
Hollis Blanchard
IBM Linux Technology Center

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1 of 8] [powerpc] add PowerPC files to .hgignore
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 2 of 8] [powerpc] add arch-powerpc.h to xen.h Hollis Blanchard
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744165 18000
# Node ID f1fa1cc62c4c821f15fb530db8f5bb291bd77a4c
# Parent  a1c2cede77c78d2af99088d7dece8f74f2a27260
[powerpc] add PowerPC files to .hgignore
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r a1c2cede77c7 -r f1fa1cc62c4c .hgignore
--- a/.hgignore	Mon Jul 10 15:01:49 2006 +0100
+++ b/.hgignore	Wed Jul 12 17:42:45 2006 -0500
@@ -203,3 +203,7 @@
 ^xen/xen$
 ^xen/xen-syms$
 ^xen/xen\..*$
+^xen/arch/ppc/dom0\.bin$
+^xen/arch/ppc/asm-offsets\.s$
+^xen/arch/ppc/firmware
+^xen/arch/ppc/firmware_image

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2 of 8] [powerpc] add arch-powerpc.h to xen.h
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 1 of 8] [powerpc] add PowerPC files to .hgignore Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 3 of 8] [powerpc] add PowerPC support to Makefiles Hollis Blanchard
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744165 18000
# Node ID f4654c1450a8c56bf9f439f09026c093cf3cb7d9
# Parent  f1fa1cc62c4c821f15fb530db8f5bb291bd77a4c
[powerpc] add arch-powerpc.h to xen.h
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r f1fa1cc62c4c -r f4654c1450a8 xen/include/public/xen.h
--- a/xen/include/public/xen.h	Wed Jul 12 17:42:45 2006 -0500
+++ b/xen/include/public/xen.h	Wed Jul 12 17:42:45 2006 -0500
@@ -15,6 +15,8 @@
 #include "arch-x86_64.h"
 #elif defined(__ia64__)
 #include "arch-ia64.h"
+#elif defined(__powerpc__)
+#include "arch-powerpc.h"
 #else
 #error "Unsupported architecture"
 #endif

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3 of 8] [powerpc] add PowerPC support to Makefiles
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 1 of 8] [powerpc] add PowerPC files to .hgignore Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 2 of 8] [powerpc] add arch-powerpc.h to xen.h Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 4 of 8] [powerpc] [xend] PPC doesn't support ballooning yet Hollis Blanchard
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744165 18000
# Node ID 49de99129bc4d762bc71b5559d0102c5691aa61e
# Parent  f4654c1450a8c56bf9f439f09026c093cf3cb7d9
[powerpc] add PowerPC support to Makefiles
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r f4654c1450a8 -r 49de99129bc4 Config.mk
--- a/Config.mk	Wed Jul 12 17:42:45 2006 -0500
+++ b/Config.mk	Wed Jul 12 17:42:45 2006 -0500
@@ -3,8 +3,8 @@
 # A debug build of Xen and tools?
 debug ?= n
 
-# Currently supported architectures: x86_32, x86_64
-XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
+XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
+                                              -e s/ppc/powerpc/)
 XEN_TARGET_ARCH     ?= $(XEN_COMPILE_ARCH)
 XEN_TARGET_X86_PAE  ?= n
 
diff -r f4654c1450a8 -r 49de99129bc4 xen/Rules.mk
--- a/xen/Rules.mk	Wed Jul 12 17:42:45 2006 -0500
+++ b/xen/Rules.mk	Wed Jul 12 17:42:45 2006 -0500
@@ -23,8 +23,10 @@ include $(XEN_ROOT)/Config.mk
 # Set ARCH/SUBARCH appropriately.
 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
 override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
-override COMPILE_ARCH    := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
-override TARGET_ARCH     := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
+override COMPILE_ARCH    := $(shell echo $(XEN_COMPILE_ARCH) | \
+                              sed -e 's/\(x86\|powerpc\).*/\1/')
+override TARGET_ARCH     := $(shell echo $(XEN_TARGET_ARCH) | \
+                              sed -e 's/\(x86\|powerpc\).*/\1/')
 
 TARGET := $(BASEDIR)/xen

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4 of 8] [powerpc] [xend] PPC doesn't support ballooning yet
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
                   ` (2 preceding siblings ...)
  2006-07-12 22:55 ` [PATCH 3 of 8] [powerpc] add PowerPC support to Makefiles Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 5 of 8] [powerpc] print page->count_info as unsigned long Hollis Blanchard
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744165 18000
# Node ID 5a11149db4c2f30cd81689a5eefc370c7fc4c410
# Parent  49de99129bc4d762bc71b5559d0102c5691aa61e
[powerpc] [xend] PPC doesn't support ballooning yet
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r 49de99129bc4 -r 5a11149db4c2 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Wed Jul 12 17:42:45 2006 -0500
+++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Jul 12 17:42:45 2006 -0500
@@ -1282,8 +1282,9 @@ class XendDomainInfo:
             xc.domain_setmaxmem(self.domid, m)
 
             init_reservation = self.info['memory'] * 1024
-            if os.uname()[4] == 'ia64':
-                # Workaround until ia64 properly supports ballooning.
+            if os.uname()[4] in ('ia64', 'ppc64'):
+                # Workaround for architectures that don't yet support
+                # ballooning.
                 init_reservation = m
 
             xc.domain_memory_increase_reservation(self.domid, init_reservation,

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 5 of 8] [powerpc] print page->count_info as unsigned long
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
                   ` (3 preceding siblings ...)
  2006-07-12 22:55 ` [PATCH 4 of 8] [powerpc] [xend] PPC doesn't support ballooning yet Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 6 of 8] [powerpc] support additional interrupt controller types in xen/arch/x86/irq.c Hollis Blanchard
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744166 18000
# Node ID 9157cbc1793231f2c95a4bdbba4a8e70681b1c6d
# Parent  5a11149db4c2f30cd81689a5eefc370c7fc4c410
[powerpc] print page->count_info as unsigned long
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r 5a11149db4c2 -r 9157cbc17932 xen/common/memory.c
--- a/xen/common/memory.c	Wed Jul 12 17:42:45 2006 -0500
+++ b/xen/common/memory.c	Wed Jul 12 17:42:46 2006 -0500
@@ -174,9 +174,9 @@ guest_remove_page(
     {
         /* We'll make this a guest-visible error in future, so take heed! */
         DPRINTK("Dom%d freeing in-use page %lx (pseudophys %lx):"
-                " count=%x type=%lx\n",
+                " count=%lx type=%lx\n",
                 d->domain_id, mfn, get_gpfn_from_mfn(mfn),
-                page->count_info, page->u.inuse.type_info);
+                (unsigned long)page->count_info, page->u.inuse.type_info);
     }
 
     guest_physmap_remove_page(d, gmfn, mfn);

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 6 of 8] [powerpc] support additional interrupt controller types in xen/arch/x86/irq.c
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
                   ` (4 preceding siblings ...)
  2006-07-12 22:55 ` [PATCH 5 of 8] [powerpc] print page->count_info as unsigned long Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 7 of 8] [powerpc] add PowerPC support to libxc Hollis Blanchard
  2006-07-12 22:55 ` [PATCH 8 of 8] [powerpc] add xencomm header, which is shared with Linux Hollis Blanchard
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744166 18000
# Node ID d3533a195a15902ad8b7bd0b9118118fae18e79c
# Parent  9157cbc1793231f2c95a4bdbba4a8e70681b1c6d
[powerpc] support additional interrupt controller types in xen/arch/x86/irq.c
PowerPC #includes xen/arch/x86/irq.c, so we need to support MPIC and XT-PIC
interrupt controllers here.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r 9157cbc17932 -r d3533a195a15 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Wed Jul 12 17:42:46 2006 -0500
+++ b/xen/arch/x86/irq.c	Wed Jul 12 17:42:46 2006 -0500
@@ -397,6 +397,20 @@ int pirq_acktype(int irq)
      */
     if ( !strcmp(desc->handler->typename, "IO-APIC-level") )
         return ioapic_ack_new ? ACKTYPE_EOI : ACKTYPE_UNMASK;
+
+    /* Legacy PIC interrupts can be acknowledged from any CPU. */
+    if ( !strcmp(desc->handler->typename, "XT-PIC") )
+        return ACKTYPE_UNMASK;
+
+    if ( strstr(desc->handler->typename, "MPIC") ) {
+        if (desc->status & IRQ_LEVEL) {
+            if (desc->status & IRQ_PER_CPU)
+                return ACKTYPE_EOI;
+            else
+                return ACKTYPE_UNMASK;
+        }
+        return ACKTYPE_NONE;
+    }
 
     BUG();
     return 0;
diff -r 9157cbc17932 -r d3533a195a15 xen/include/xen/irq.h
--- a/xen/include/xen/irq.h	Wed Jul 12 17:42:46 2006 -0500
+++ b/xen/include/xen/irq.h	Wed Jul 12 17:42:46 2006 -0500
@@ -22,6 +22,7 @@ struct irqaction
 #define IRQ_PENDING	4	/* IRQ pending - replay on enable */
 #define IRQ_REPLAY	8	/* IRQ has been replayed but not acked yet */
 #define IRQ_GUEST       16      /* IRQ is handled by guest OS(es) */
+#define IRQ_LEVEL		64	/* IRQ level triggered */
 #define IRQ_PER_CPU     256     /* IRQ is per CPU */
 
 /*

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 7 of 8] [powerpc] add PowerPC support to libxc
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
                   ` (5 preceding siblings ...)
  2006-07-12 22:55 ` [PATCH 6 of 8] [powerpc] support additional interrupt controller types in xen/arch/x86/irq.c Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  2006-07-13  7:03   ` Tristan Gingold
  2006-07-12 22:55 ` [PATCH 8 of 8] [powerpc] add xencomm header, which is shared with Linux Hollis Blanchard
  7 siblings, 1 reply; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 8 of 8] [powerpc] add xencomm header, which is shared with Linux
  2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
                   ` (6 preceding siblings ...)
  2006-07-12 22:55 ` [PATCH 7 of 8] [powerpc] add PowerPC support to libxc Hollis Blanchard
@ 2006-07-12 22:55 ` Hollis Blanchard
  7 siblings, 0 replies; 10+ messages in thread
From: Hollis Blanchard @ 2006-07-12 22:55 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ppc-devel

# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1152744412 18000
# Node ID d9aba25e6e7d3a5811850c73b98e07d67187928a
# Parent  8400d02096faf9fd566c9ea73a57811ac5d34acd
[powerpc] add xencomm header, which is shared with Linux
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 7 of 8] [powerpc] add PowerPC support to libxc
  2006-07-12 22:55 ` [PATCH 7 of 8] [powerpc] add PowerPC support to libxc Hollis Blanchard
@ 2006-07-13  7:03   ` Tristan Gingold
  0 siblings, 0 replies; 10+ messages in thread
From: Tristan Gingold @ 2006-07-13  7:03 UTC (permalink / raw)
  To: Hollis Blanchard, xen-devel; +Cc: xen-ppc-devel

Le Jeudi 13 Juillet 2006 00:55, Hollis Blanchard a écrit :
[...]

On ia64, we have created a tools/libxc/ia64 directory.
This is because we have a few ia64 specific files (at least 4).
This hasn't been merged yet but the idea seems to have already been discussed 
and accepted.

Tristan.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-07-13  7:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12 22:55 [PATCH 0 of 8] common code changes for PowerPC merge Hollis Blanchard
2006-07-12 22:55 ` [PATCH 1 of 8] [powerpc] add PowerPC files to .hgignore Hollis Blanchard
2006-07-12 22:55 ` [PATCH 2 of 8] [powerpc] add arch-powerpc.h to xen.h Hollis Blanchard
2006-07-12 22:55 ` [PATCH 3 of 8] [powerpc] add PowerPC support to Makefiles Hollis Blanchard
2006-07-12 22:55 ` [PATCH 4 of 8] [powerpc] [xend] PPC doesn't support ballooning yet Hollis Blanchard
2006-07-12 22:55 ` [PATCH 5 of 8] [powerpc] print page->count_info as unsigned long Hollis Blanchard
2006-07-12 22:55 ` [PATCH 6 of 8] [powerpc] support additional interrupt controller types in xen/arch/x86/irq.c Hollis Blanchard
2006-07-12 22:55 ` [PATCH 7 of 8] [powerpc] add PowerPC support to libxc Hollis Blanchard
2006-07-13  7:03   ` Tristan Gingold
2006-07-12 22:55 ` [PATCH 8 of 8] [powerpc] add xencomm header, which is shared with Linux Hollis Blanchard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.