direct-io.hg

changeset 14676:c1578c694b39

xen: Fix numa=on boot.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Sat Mar 31 12:20:31 2007 +0100 (2007-03-31)
parents b0b20a09d253
children 6898d8ae7ae4
files xen/arch/x86/setup.c xen/common/page_alloc.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Fri Mar 30 19:02:40 2007 +0100
     1.2 +++ b/xen/arch/x86/setup.c	Sat Mar 31 12:20:31 2007 +0100
     1.3 @@ -591,8 +591,6 @@ void __init __start_xen(multiboot_info_t
     1.4  
     1.5      numa_initmem_init(0, max_page);
     1.6  
     1.7 -    end_boot_allocator();
     1.8 -
     1.9      /* Initialise the Xen heap, skipping RAM holes. */
    1.10      nr_pages = 0;
    1.11      for ( i = 0; i < e820.nr_map; i++ )
    1.12 @@ -618,6 +616,8 @@ void __init __start_xen(multiboot_info_t
    1.13             nr_pages >> (20 - PAGE_SHIFT),
    1.14             nr_pages << (PAGE_SHIFT - 10));
    1.15  
    1.16 +    end_boot_allocator();
    1.17 +
    1.18      early_boot = 0;
    1.19  
    1.20      early_cpu_init();
     2.1 --- a/xen/common/page_alloc.c	Fri Mar 30 19:02:40 2007 +0100
     2.2 +++ b/xen/common/page_alloc.c	Sat Mar 31 12:20:31 2007 +0100
     2.3 @@ -512,6 +512,14 @@ void init_heap_pages(
     2.4  
     2.5      ASSERT(zone < NR_ZONES);
     2.6  
     2.7 +    if ( unlikely(avail[0] == NULL) )
     2.8 +    {
     2.9 +        /* Start-of-day memory node 0 initialisation. */
    2.10 +        init_heap_block(&_heap0);
    2.11 +        _heap[0] = &_heap0;
    2.12 +        avail[0] = avail0;
    2.13 +    }
    2.14 +
    2.15      if ( likely(page_to_mfn(pg) != 0) )
    2.16          nid_prev = phys_to_nid(page_to_maddr(pg-1));
    2.17      else
    2.18 @@ -570,10 +578,6 @@ void end_boot_allocator(void)
    2.19      unsigned long i;
    2.20      int curr_free, next_free;
    2.21  
    2.22 -    init_heap_block(&_heap0);
    2.23 -    _heap[0] = &_heap0;
    2.24 -    avail[0] = avail0;
    2.25 -
    2.26      /* Pages that are free now go to the domain sub-allocator. */
    2.27      if ( (curr_free = next_free = !allocated_in_map(first_valid_mfn)) )
    2.28          map_alloc(first_valid_mfn, 1);