# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1232459840 0
# Node ID 681af1946724258bf7758301c46425cd988a4ce2
# Parent fb0dc8143932c3beeda160585597a42b80549b0d
x86_32: Get rid of xenheap_phys_start as it is zero after start of day.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/x86/setup.c | 13 ++++++-------
xen/arch/x86/x86_32/mm.c | 6 +++---
xen/include/asm-x86/config.h | 2 +-
xen/include/asm-x86/mm.h | 3 +--
4 files changed, 11 insertions(+), 13 deletions(-)
diff -r fb0dc8143932 -r 681af1946724 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c Tue Jan 20 13:27:08 2009 +0000
+++ b/xen/arch/x86/setup.c Tue Jan 20 13:57:20 2009 +0000
@@ -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 mb
/* 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 mb
#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 @@ int xen_in_range(paddr_t start, paddr_t
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);
diff -r fb0dc8143932 -r 681af1946724 xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c Tue Jan 20 13:27:08 2009 +0000
+++ b/xen/arch/x86/x86_32/mm.c Tue Jan 20 13:57:20 2009 +0000
@@ -43,7 +43,7 @@ void *alloc_xen_pagetable(void)
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);
}
diff -r fb0dc8143932 -r 681af1946724 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h Tue Jan 20 13:27:08 2009 +0000
+++ b/xen/include/asm-x86/config.h Tue Jan 20 13:57:20 2009 +0000
@@ -339,7 +339,7 @@ extern unsigned int video_mode, video_fl
#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
diff -r fb0dc8143932 -r 681af1946724 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h Tue Jan 20 13:27:08 2009 +0000
+++ b/xen/include/asm-x86/mm.h Tue Jan 20 13:57:20 2009 +0000
@@ -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)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|