# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 7de08aceff6de9569c6723c8283f6a653f1e90ea
# Parent  c7fa7c41b9e60cddddf90feddea8c15f015f436b
[XEN][POWERPC] compress all extents into a single LMB

Linux prom code has a static limit.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 xen/arch/powerpc/ofd_fixup_memory.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -r c7fa7c41b9e6 -r 7de08aceff6d xen/arch/powerpc/ofd_fixup_memory.c
--- a/xen/arch/powerpc/ofd_fixup_memory.c       Fri Sep 29 14:31:05 2006 -0400
+++ b/xen/arch/powerpc/ofd_fixup_memory.c       Fri Sep 29 19:09:26 2006 -0400
@@ -68,6 +68,8 @@ static ofdn_t ofd_memory_node_create(
     reg.sz = size;
     ofd_prop_add(m, n, "reg", &reg, sizeof (reg));
 
+    printk("Dom0: %s: %016lx, %016lx\n", path, start, size);
+
     return n;
 }
 
@@ -88,17 +90,17 @@ static void ofd_memory_extent_nodes(void
     struct page_extents *pe;
     ulong cur_pfn = 1UL << d->arch.rma_order;
 
+    start = cur_pfn << PAGE_SHIFT;
+    size = 0;
     list_for_each_entry (pe, &d->arch.extent_list, pe_list) {
 
-        start = cur_pfn << PAGE_SHIFT;
-        size = 1UL << (pe->order + PAGE_SHIFT);
-
-        n = ofd_memory_node_create(m, OFD_ROOT, "", memory, memory,
-                                    start, size);
-
-        BUG_ON(n <= 0);
-        cur_pfn += 1UL << pe->order;
+        size += 1UL << (pe->order + PAGE_SHIFT);
+        if (pe->order != cpu_extent_order())
+            panic("we don't handle this yet\n");
     }
+    n = ofd_memory_node_create(m, OFD_ROOT, "", memory, memory,
+                               start, size);
+    BUG_ON(n <= 0);
 }
 
 void ofd_memory_props(void *m, struct domain *d)

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

Reply via email to