ia64/xen-unstable
changeset 12986:5d052711af78
[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@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
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@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author | Jimi Xenidis <jimix@watson.ibm.com> |
---|---|
date | Mon Dec 11 20:50:32 2006 -0500 (2006-12-11) |
parents | 3d7759a9247f |
children | c08ac3b211c8 |
files | xen/arch/powerpc/boot_of.c |
line diff
1.1 --- a/xen/arch/powerpc/boot_of.c Mon Dec 11 19:43:18 2006 -0500 1.2 +++ b/xen/arch/powerpc/boot_of.c Mon Dec 11 20:50:32 2006 -0500 1.3 @@ -431,19 +431,8 @@ static void boot_of_alloc_init(int m, ui 1.4 } 1.5 } 1.6 1.7 - /* FW is incorrect in that the space below our image is not safe 1.8 - * either */ 1.9 - start = (ulong)_start >> PAGE_SHIFT; 1.10 - pg = 0; 1.11 - DBG("%s: marking 0x%x - 0x%lx\n", __func__, 1.12 - pg << PAGE_SHIFT, start); 1.13 - while (pg < start - 1) { 1.14 - set_bit(pg, mem_available_pages); 1.15 - ++pg; 1.16 - } 1.17 - 1.18 /* Now make sure we mark our own memory */ 1.19 - pg = start; 1.20 + pg = (ulong)_start >> PAGE_SHIFT; 1.21 start = (ulong)_end >> PAGE_SHIFT; 1.22 1.23 DBG("%s: marking 0x%x - 0x%lx\n", __func__, 1.24 @@ -521,11 +510,8 @@ static ulong boot_of_alloc(ulong size) 1.25 /* find a set that fits */ 1.26 DBG("%s: checking for 0x%lx bits: 0x%lx\n", __func__, bits, pos); 1.27 1.28 - i = 1; 1.29 - while (i < bits && !test_bit(pos + i, mem_available_pages)) 1.30 - ++i; 1.31 - 1.32 - if (i == bits) { 1.33 + i = find_next_bit(mem_available_pages, MEM_AVAILABLE_PAGES, pos); 1.34 + if (i - pos >= bits) { 1.35 uint addr = pos << PAGE_SHIFT; 1.36 1.37 /* make sure OF is happy with our choice */ 1.38 @@ -1073,7 +1059,7 @@ static void * __init boot_of_devtree(mod 1.39 1.40 mod->mod_start = (ulong)oft; 1.41 mod->mod_end = mod->mod_start + oft_sz; 1.42 - of_printf("%s: devtree mod @ 0x%016x[0x%x]\n", __func__, 1.43 + of_printf("%s: devtree mod @ 0x%016x - 0x%016x\n", __func__, 1.44 mod->mod_start, mod->mod_end); 1.45 1.46 return oft; 1.47 @@ -1152,7 +1138,6 @@ static void * __init boot_of_module(ulon 1.48 ++mod; 1.49 1.50 oft = boot_of_devtree(&mods[mod], mbi); 1.51 - of_printf("hello\n"); 1.52 if (oft == NULL) 1.53 of_panic("%s: boot_of_devtree failed\n", __func__); 1.54