WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN][POWERPC] boot_of_allocator fixups

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN][POWERPC] boot_of_allocator fixups
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:35:09 +0000
Delivery-date: Wed, 13 Dec 2006 09:41:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 5d052711af78336826e5d180cb7aaca2723d0f05
# Parent  3d7759a9247f45445619348a69e32167ceafedf5
[XEN][POWERPC] boot_of_allocator fixups
This patch:
  - print devtree mod size correctly
  - find next_bit rather then test all needed bits to be zero
  - stop pre-allocating memory below image as used
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/boot_of.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff -r 3d7759a9247f -r 5d052711af78 xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Mon Dec 11 19:43:18 2006 -0500
+++ b/xen/arch/powerpc/boot_of.c        Mon Dec 11 20:50:32 2006 -0500
@@ -431,19 +431,8 @@ static void boot_of_alloc_init(int m, ui
         }
     }
 
-    /* FW is incorrect in that the space below our image is not safe
-     * either */
-    start = (ulong)_start >> PAGE_SHIFT;
-    pg = 0;
-    DBG("%s: marking 0x%x - 0x%lx\n", __func__,
-        pg << PAGE_SHIFT, start);
-    while (pg < start - 1) {
-        set_bit(pg, mem_available_pages);
-        ++pg;
-    }
-        
     /* Now make sure we mark our own memory */
-    pg = start;
+    pg =  (ulong)_start >> PAGE_SHIFT;
     start = (ulong)_end >> PAGE_SHIFT;
 
     DBG("%s: marking 0x%x - 0x%lx\n", __func__,
@@ -521,11 +510,8 @@ static ulong boot_of_alloc(ulong size)
         /* find a set that fits */
         DBG("%s: checking for 0x%lx bits: 0x%lx\n", __func__, bits, pos);
 
-        i = 1;
-        while (i < bits && !test_bit(pos + i, mem_available_pages))
-            ++i;
-
-        if (i == bits) {
+        i = find_next_bit(mem_available_pages, MEM_AVAILABLE_PAGES, pos);  
+        if (i - pos >= bits) {
             uint addr = pos << PAGE_SHIFT;
 
             /* make sure OF is happy with our choice */
@@ -1073,7 +1059,7 @@ static void * __init boot_of_devtree(mod
 
     mod->mod_start = (ulong)oft;
     mod->mod_end = mod->mod_start + oft_sz;
-    of_printf("%s: devtree mod @ 0x%016x[0x%x]\n", __func__,
+    of_printf("%s: devtree mod @ 0x%016x - 0x%016x\n", __func__,
               mod->mod_start, mod->mod_end);
 
     return oft;
@@ -1152,7 +1138,6 @@ static void * __init boot_of_module(ulon
         ++mod;
 
     oft = boot_of_devtree(&mods[mod], mbi);
-    of_printf("hello\n");
     if (oft == NULL)
         of_panic("%s: boot_of_devtree failed\n", __func__);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN][POWERPC] boot_of_allocator fixups, Xen patchbot-unstable <=