x86_32: Get rid of xenheap_phys_start as it is zero after start of day.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 20 Jan 2009 13:57:20 +0000 (13:57 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 20 Jan 2009 13:57:20 +0000 (13:57 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/setup.c
xen/arch/x86/x86_32/mm.c
xen/include/asm-x86/config.h
xen/include/asm-x86/mm.h

index 34609ca8cd7fe5fe2afa3bf592c178eb03045566..04efdc3644da1e45e69b332540ac6112970318fd 100644 (file)
@@ -98,7 +98,7 @@ unsigned long xen_phys_start;
 
 #ifdef CONFIG_X86_32
 /* Limits of Xen heap, used to initialise the allocator. */
-unsigned long xenheap_phys_start, xenheap_phys_end;
+unsigned long xenheap_initial_phys_start, xenheap_phys_end;
 #endif
 
 extern void arch_init_memory(void);
@@ -741,8 +741,8 @@ void __init __start_xen(unsigned long mbi_p)
     /* Initialise boot heap. */
     allocator_bitmap_end = init_boot_allocator(__pa(&_end));
 #if defined(CONFIG_X86_32)
-    xenheap_phys_start = allocator_bitmap_end;
-    xenheap_phys_end   = DIRECTMAP_MBYTES << 20;
+    xenheap_initial_phys_start = allocator_bitmap_end;
+    xenheap_phys_end = DIRECTMAP_MBYTES << 20;
 #else
     if ( !xen_phys_start )
         EARLY_FAIL("Not enough memory to relocate Xen.\n");
@@ -841,9 +841,8 @@ void __init __start_xen(unsigned long mbi_p)
 
 #if defined(CONFIG_X86_32)
     /* Initialise the Xen heap. */
-    init_xenheap_pages(xenheap_phys_start, xenheap_phys_end);
-    nr_pages = (xenheap_phys_end - xenheap_phys_start) >> PAGE_SHIFT;
-    xenheap_phys_start = xen_phys_start;
+    init_xenheap_pages(xenheap_initial_phys_start, xenheap_phys_end);
+    nr_pages = (xenheap_phys_end - xenheap_initial_phys_start) >> PAGE_SHIFT;
     printk("Xen heap: %luMB (%lukB)\n", 
            nr_pages >> (20 - PAGE_SHIFT),
            nr_pages << (PAGE_SHIFT - 10));
@@ -1094,7 +1093,7 @@ void arch_get_xen_caps(xen_capabilities_info_t *info)
 int xen_in_range(paddr_t start, paddr_t end)
 {
 #if defined(CONFIG_X86_32)
-    paddr_t xs = xenheap_phys_start;
+    paddr_t xs = 0;
     paddr_t xe = xenheap_phys_end;
 #else
     paddr_t xs = __pa(&_start);
index d19f04f9f044d3c3dc984a089d54523c42077184..3d266b28bd65f36ea03db0e26ed69129910fcd82 100644 (file)
@@ -43,7 +43,7 @@ static unsigned long mpt_size;
 void *alloc_xen_pagetable(void)
 {
     extern int early_boot;
-    extern unsigned long xenheap_phys_start;
+    extern unsigned long xenheap_initial_phys_start;
     unsigned long mfn;
 
     if ( !early_boot )
@@ -53,8 +53,8 @@ void *alloc_xen_pagetable(void)
         return v;
     }
 
-    mfn = xenheap_phys_start >> PAGE_SHIFT;
-    xenheap_phys_start += PAGE_SIZE;
+    mfn = xenheap_initial_phys_start >> PAGE_SHIFT;
+    xenheap_initial_phys_start += PAGE_SIZE;
     return mfn_to_virt(mfn);
 }
 
index 51337c0b79a64f6a90f6cd3142921ce08f370531..9d140ef891d0696ade4334dfd2e3a9f829a9a0e8 100644 (file)
@@ -339,7 +339,7 @@ extern unsigned int video_mode, video_flags;
 #ifndef __ASSEMBLY__
 extern unsigned long xen_phys_start;
 #if defined(__i386__)
-extern unsigned long xenheap_phys_start, xenheap_phys_end;
+extern unsigned long xenheap_phys_end;
 #endif
 #endif
 
index b10e548db2bcae207fed50832713e9d5c347dbfd..a51b4a803e2c24433e6e18aab2fc7e50516a437f 100644 (file)
@@ -153,8 +153,7 @@ struct page_info
 #define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page))
 #define is_xen_heap_mfn(mfn) ({                         \
     unsigned long _mfn = (mfn);                         \
-    ((_mfn >= paddr_to_pfn(xenheap_phys_start)) &&      \
-     (_mfn < paddr_to_pfn(xenheap_phys_end)));          \
+    (_mfn < paddr_to_pfn(xenheap_phys_end));            \
 })
 #else
 #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap)