ia64/xen-unstable

changeset 13031:7b6aba313aac

[XEN] Fix memory allocator after recent bootmem change.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Dec 14 15:43:40 2006 +0000 (2006-12-14)
parents 664e762a10e8
children afc6b5a60866
files xen/common/page_alloc.c
line diff
     1.1 --- a/xen/common/page_alloc.c	Thu Dec 14 15:12:38 2006 +0000
     1.2 +++ b/xen/common/page_alloc.c	Thu Dec 14 15:43:40 2006 +0000
     1.3 @@ -295,7 +295,7 @@ static DEFINE_SPINLOCK(heap_lock);
     1.4  void end_boot_allocator(void)
     1.5  {
     1.6      unsigned long i, j, k;
     1.7 -    int curr_free = 0, next_free = 0;
     1.8 +    int curr_free, next_free;
     1.9  
    1.10      memset(avail, 0, sizeof(avail));
    1.11  
    1.12 @@ -305,6 +305,8 @@ void end_boot_allocator(void)
    1.13                  INIT_LIST_HEAD(&heap[i][j][k]);
    1.14  
    1.15      /* Pages that are free now go to the domain sub-allocator. */
    1.16 +    if ( (curr_free = next_free = !allocated_in_map(first_valid_mfn)) )
    1.17 +        map_alloc(first_valid_mfn, 1);
    1.18      for ( i = first_valid_mfn; i < max_page; i++ )
    1.19      {
    1.20          curr_free = next_free;