ia64/xen-unstable

changeset 19061:681af1946724

x86_32: Get rid of xenheap_phys_start as it is zero after start of day.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 20 13:57:20 2009 +0000 (2009-01-20)
parents fb0dc8143932
children 108b45539cda
files xen/arch/x86/setup.c xen/arch/x86/x86_32/mm.c xen/include/asm-x86/config.h xen/include/asm-x86/mm.h
line diff
     1.1 --- a/xen/arch/x86/setup.c	Tue Jan 20 13:27:08 2009 +0000
     1.2 +++ b/xen/arch/x86/setup.c	Tue Jan 20 13:57:20 2009 +0000
     1.3 @@ -98,7 +98,7 @@ unsigned long xen_phys_start;
     1.4  
     1.5  #ifdef CONFIG_X86_32
     1.6  /* Limits of Xen heap, used to initialise the allocator. */
     1.7 -unsigned long xenheap_phys_start, xenheap_phys_end;
     1.8 +unsigned long xenheap_initial_phys_start, xenheap_phys_end;
     1.9  #endif
    1.10  
    1.11  extern void arch_init_memory(void);
    1.12 @@ -741,8 +741,8 @@ void __init __start_xen(unsigned long mb
    1.13      /* Initialise boot heap. */
    1.14      allocator_bitmap_end = init_boot_allocator(__pa(&_end));
    1.15  #if defined(CONFIG_X86_32)
    1.16 -    xenheap_phys_start = allocator_bitmap_end;
    1.17 -    xenheap_phys_end   = DIRECTMAP_MBYTES << 20;
    1.18 +    xenheap_initial_phys_start = allocator_bitmap_end;
    1.19 +    xenheap_phys_end = DIRECTMAP_MBYTES << 20;
    1.20  #else
    1.21      if ( !xen_phys_start )
    1.22          EARLY_FAIL("Not enough memory to relocate Xen.\n");
    1.23 @@ -841,9 +841,8 @@ void __init __start_xen(unsigned long mb
    1.24  
    1.25  #if defined(CONFIG_X86_32)
    1.26      /* Initialise the Xen heap. */
    1.27 -    init_xenheap_pages(xenheap_phys_start, xenheap_phys_end);
    1.28 -    nr_pages = (xenheap_phys_end - xenheap_phys_start) >> PAGE_SHIFT;
    1.29 -    xenheap_phys_start = xen_phys_start;
    1.30 +    init_xenheap_pages(xenheap_initial_phys_start, xenheap_phys_end);
    1.31 +    nr_pages = (xenheap_phys_end - xenheap_initial_phys_start) >> PAGE_SHIFT;
    1.32      printk("Xen heap: %luMB (%lukB)\n", 
    1.33             nr_pages >> (20 - PAGE_SHIFT),
    1.34             nr_pages << (PAGE_SHIFT - 10));
    1.35 @@ -1094,7 +1093,7 @@ void arch_get_xen_caps(xen_capabilities_
    1.36  int xen_in_range(paddr_t start, paddr_t end)
    1.37  {
    1.38  #if defined(CONFIG_X86_32)
    1.39 -    paddr_t xs = xenheap_phys_start;
    1.40 +    paddr_t xs = 0;
    1.41      paddr_t xe = xenheap_phys_end;
    1.42  #else
    1.43      paddr_t xs = __pa(&_start);
     2.1 --- a/xen/arch/x86/x86_32/mm.c	Tue Jan 20 13:27:08 2009 +0000
     2.2 +++ b/xen/arch/x86/x86_32/mm.c	Tue Jan 20 13:57:20 2009 +0000
     2.3 @@ -43,7 +43,7 @@ static unsigned long mpt_size;
     2.4  void *alloc_xen_pagetable(void)
     2.5  {
     2.6      extern int early_boot;
     2.7 -    extern unsigned long xenheap_phys_start;
     2.8 +    extern unsigned long xenheap_initial_phys_start;
     2.9      unsigned long mfn;
    2.10  
    2.11      if ( !early_boot )
    2.12 @@ -53,8 +53,8 @@ void *alloc_xen_pagetable(void)
    2.13          return v;
    2.14      }
    2.15  
    2.16 -    mfn = xenheap_phys_start >> PAGE_SHIFT;
    2.17 -    xenheap_phys_start += PAGE_SIZE;
    2.18 +    mfn = xenheap_initial_phys_start >> PAGE_SHIFT;
    2.19 +    xenheap_initial_phys_start += PAGE_SIZE;
    2.20      return mfn_to_virt(mfn);
    2.21  }
    2.22  
     3.1 --- a/xen/include/asm-x86/config.h	Tue Jan 20 13:27:08 2009 +0000
     3.2 +++ b/xen/include/asm-x86/config.h	Tue Jan 20 13:57:20 2009 +0000
     3.3 @@ -339,7 +339,7 @@ extern unsigned int video_mode, video_fl
     3.4  #ifndef __ASSEMBLY__
     3.5  extern unsigned long xen_phys_start;
     3.6  #if defined(__i386__)
     3.7 -extern unsigned long xenheap_phys_start, xenheap_phys_end;
     3.8 +extern unsigned long xenheap_phys_end;
     3.9  #endif
    3.10  #endif
    3.11  
     4.1 --- a/xen/include/asm-x86/mm.h	Tue Jan 20 13:27:08 2009 +0000
     4.2 +++ b/xen/include/asm-x86/mm.h	Tue Jan 20 13:57:20 2009 +0000
     4.3 @@ -153,8 +153,7 @@ struct page_info
     4.4  #define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page))
     4.5  #define is_xen_heap_mfn(mfn) ({                         \
     4.6      unsigned long _mfn = (mfn);                         \
     4.7 -    ((_mfn >= paddr_to_pfn(xenheap_phys_start)) &&      \
     4.8 -     (_mfn < paddr_to_pfn(xenheap_phys_end)));          \
     4.9 +    (_mfn < paddr_to_pfn(xenheap_phys_end));            \
    4.10  })
    4.11  #else
    4.12  #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap)