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

[Xen-changelog] [xen-unstable] [XEN][POWERPC] catch up with xen-unstable changes



# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID 18ce855ff594098e218123ec4c2d03e2e23acdd0
# Parent  030a041bbe90bf1483bf56a19ad6e8c587e5fe12
[XEN][POWERPC] catch up with xen-unstable changes
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/Rules.mk        |    2 +-
 xen/arch/powerpc/boot_of.c       |    5 ++++-
 xen/arch/powerpc/dom0_ops.c      |   33 +++++++++++++++++++--------------
 xen/arch/powerpc/setup.c         |    2 ++
 xen/arch/powerpc/shadow.c        |   15 +++++++--------
 xen/include/asm-powerpc/shadow.h |    8 ++++----
 6 files changed, 37 insertions(+), 28 deletions(-)

diff -r 030a041bbe90 -r 18ce855ff594 xen/arch/powerpc/Rules.mk
--- a/xen/arch/powerpc/Rules.mk Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/arch/powerpc/Rules.mk Tue Aug 29 17:53:57 2006 -0500
@@ -4,7 +4,7 @@ LD := $(CROSS_COMPILE)ld
 LD := $(CROSS_COMPILE)ld
 
 # These are goodess that applies to all source.
-C_WARNINGS := -Wpointer-arith -Wredundant-decls
+C_WARNINGS := -Wredundant-decls
 
 # _no_ common code can have packed data structures or we are in touble.
 C_WARNINGS += -Wpacked
diff -r 030a041bbe90 -r 18ce855ff594 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/arch/powerpc/boot_of.c        Tue Aug 29 17:53:57 2006 -0500
@@ -993,6 +993,7 @@ static int __init boot_of_cpus(void)
     /* We want a continuous logical cpu number space.  */
     cpu_set(0, cpu_present_map);
     cpu_set(0, cpu_online_map);
+    cpu_set(0, cpu_possible_map);
 
     /* Spin up all CPUS, even if there are more than NR_CPUS, because
      * Open Firmware has them spinning on cache lines which will
@@ -1039,8 +1040,10 @@ static int __init boot_of_cpus(void)
         } while (pong == ping);
         of_printf("pong = 0x%x\n", pong);
 
-        if (pong != ping)
+        if (pong != ping) {
             cpu_set(logical, cpu_present_map);
+            cpu_set(logical, cpu_possible_map);
+        }
 
         cpu = of_getpeer(cpu);
     }
diff -r 030a041bbe90 -r 18ce855ff594 xen/arch/powerpc/dom0_ops.c
--- a/xen/arch/powerpc/dom0_ops.c       Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/arch/powerpc/dom0_ops.c       Tue Aug 29 17:53:57 2006 -0500
@@ -28,12 +28,15 @@
 #include <public/domctl.h>
 #include <public/sysctl.h>
 
+void arch_getdomaininfo_ctxt(struct vcpu *, vcpu_guest_context_t *);
 void arch_getdomaininfo_ctxt(struct vcpu *v, vcpu_guest_context_t *c)
 { 
     memcpy(&c->user_regs, &v->arch.ctxt, sizeof(struct cpu_user_regs));
     /* XXX fill in rest of vcpu_guest_context_t */
 }
 
+long arch_do_domctl(struct xen_domctl *domctl,
+                    XEN_GUEST_HANDLE(xen_domctl_t) u_domctl);
 long arch_do_domctl(struct xen_domctl *domctl,
                     XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
 {
@@ -76,6 +79,19 @@ long arch_do_domctl(struct xen_domctl *d
         }
     }
     break;
+    case XEN_DOMCTL_shadow_op:
+    {
+        struct domain *d;
+        ret = -ESRCH;
+        d = find_domain_by_id(domctl->domain);
+        if ( d != NULL )
+        {
+            ret = shadow_domctl(d, &domctl->u.shadow_op, u_domctl);
+            put_domain(d);
+            copy_to_guest(u_domctl, domctl, 1);
+        } 
+    }
+    break;
 
     default:
         ret = -ENOSYS;
@@ -85,6 +101,8 @@ long arch_do_domctl(struct xen_domctl *d
     return ret;
 }
 
+long arch_do_sysctl(struct xen_sysctl *sysctl,
+                    XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl);
 long arch_do_sysctl(struct xen_sysctl *sysctl,
                     XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
 {
@@ -108,22 +126,9 @@ long arch_do_sysctl(struct xen_sysctl *s
             ret = -EFAULT;
     }
     break;
-    case DOM0_SHADOW_CONTROL:
-    {
-        struct domain *d;
-        ret = -ESRCH;
-        d = find_domain_by_id(op->u.shadow_control.domain);
-        if ( d != NULL )
-        {
-            ret = shadow_control_op(d, &op->u.shadow_control, u_dom0_op);
-            put_domain(d);
-            copy_to_guest(u_dom0_op, op, 1);
-        } 
-    }
-    break;
 
     default:
-        printk("%s: unsupported op: 0x%x\n", __func__, (op->cmd));
+        printk("%s: unsupported sysctl: 0x%x\n", __func__, (sysctl->cmd));
         ret = -ENOSYS;
         break;
     }
diff -r 030a041bbe90 -r 18ce855ff594 xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Tue Aug 29 17:53:57 2006 -0500
@@ -74,6 +74,7 @@ cpumask_t cpu_sibling_map[NR_CPUS] __rea
 cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly;
 cpumask_t cpu_online_map; /* missing ifdef in schedule.c */
 cpumask_t cpu_present_map;
+cpumask_t cpu_possible_map;
 
 /* XXX get this from ISA node in device tree */
 ulong isa_io_base;
@@ -254,6 +255,7 @@ static int kick_secondary_cpus(int maxcp
             break;
         init_parea(cpuid);
         cpu_set(cpuid, cpu_online_map);
+        cpu_set(cpuid, cpu_possible_map);
     }
 
     return 0;
diff -r 030a041bbe90 -r 18ce855ff594 xen/arch/powerpc/shadow.c
--- a/xen/arch/powerpc/shadow.c Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/arch/powerpc/shadow.c Tue Aug 29 17:53:57 2006 -0500
@@ -21,7 +21,6 @@
 #include <xen/config.h>
 #include <xen/types.h>
 #include <xen/shadow.h>
-#include <public/dom0_ops.h>
 
 static ulong htab_calc_sdr1(ulong htab_addr, ulong log_htab_size)
 {
@@ -116,9 +115,9 @@ unsigned int shadow_set_allocation(struc
     return rc;
 }
 
-int shadow_control_op(struct domain *d, 
-                      dom0_shadow_control_t *sc,
-                      XEN_GUEST_HANDLE(dom0_op_t) u_dom0_op)
+int shadow_domctl(struct domain *d, 
+                                 xen_domctl_shadow_op_t *sc,
+                                 XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
 {
     if ( unlikely(d == current->domain) )
     {
@@ -128,15 +127,15 @@ int shadow_control_op(struct domain *d,
 
     switch ( sc->op )
     {
-    case DOM0_SHADOW_CONTROL_OP_OFF:
+    case XEN_DOMCTL_SHADOW_OP_OFF:
          DPRINTK("Shadow is mandatory!\n");
          return -EINVAL;
 
-    case DOM0_SHADOW2_CONTROL_OP_GET_ALLOCATION:
+    case XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION:
         sc->mb = shadow_get_allocation(d);
         return 0;
 
-    case DOM0_SHADOW2_CONTROL_OP_SET_ALLOCATION: {
+    case XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION: {
         int rc;
         int preempted = 0;
 
@@ -145,7 +144,7 @@ int shadow_control_op(struct domain *d,
         if (preempted)
             /* Not finished.  Set up to re-run the call. */
             rc = hypercall_create_continuation(
-                __HYPERVISOR_dom0_op, "h", u_dom0_op);
+                __HYPERVISOR_domctl, "h", u_domctl);
         else 
             /* Finished.  Return the new allocation */
             sc->mb = shadow_get_allocation(d);
diff -r 030a041bbe90 -r 18ce855ff594 xen/include/asm-powerpc/shadow.h
--- a/xen/include/asm-powerpc/shadow.h  Tue Aug 29 06:53:58 2006 -0400
+++ b/xen/include/asm-powerpc/shadow.h  Tue Aug 29 17:53:57 2006 -0500
@@ -57,14 +57,14 @@ static inline void mark_dirty(struct dom
 }
 #define gnttab_mark_dirty(d, f) mark_dirty((d), (f))
 
-extern int shadow_control_op(struct domain *d, 
-                             dom0_shadow_control_t *sc,
-                             XEN_GUEST_HANDLE(dom0_op_t) u_dom0_op);
+extern int shadow_domctl(struct domain *d, 
+                   xen_domctl_shadow_op_t *sc,
+                   XEN_GUEST_HANDLE(xen_domctl_t) u_domctl);
 extern unsigned int shadow_teardown(struct domain *d);
 extern unsigned int shadow_set_allocation(
     struct domain *d, unsigned int megabytes, int *preempted);
 
-/* Return the size of the shadow2 pool, rounded up to the nearest MB */
+/* Return the size of the shadow pool, rounded up to the nearest MB */
 static inline unsigned int shadow_get_allocation(struct domain *d)
 {
     return (1ULL << (d->arch.htab.order + PAGE_SHIFT)) >> 20;

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