ia64/xen-unstable

changeset 6250:684d81933442

Clean up bootmem initialisation for x86/64. Question still
remains over why boot fails if we try to free up the bottom
1MB of pseudophysical memory...

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Aug 18 16:04:00 2005 +0000 (2005-08-18)
parents e83fc5afec3c
children 082a537ff4de
files linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Thu Aug 18 15:01:03 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Thu Aug 18 16:04:00 2005 +0000
     1.3 @@ -426,16 +426,10 @@ static __init void parse_cmdline_early (
     1.4  #ifdef CONFIG_XEN
     1.5  static void __init contig_initmem_init(void)
     1.6  {
     1.7 -        unsigned long bootmap_size, bootmap; 
     1.8 -
     1.9 -        bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT;
    1.10 -        bootmap = start_pfn;
    1.11 -        bootmap_size = init_bootmem(bootmap, end_pfn);
    1.12 -        reserve_bootmem(bootmap, bootmap_size);
    1.13 -        
    1.14 -        free_bootmem(start_pfn << PAGE_SHIFT, (end_pfn - start_pfn) << PAGE_SHIFT);   
    1.15 -        reserve_bootmem(0, (PFN_PHYS(start_pfn) +
    1.16 -                            bootmap_size + PAGE_SIZE-1));
    1.17 +        unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
    1.18 +        free_bootmem(0, end_pfn << PAGE_SHIFT);   
    1.19 +        /* XXX KAF: Why can't we leave low 1MB of memory free? */
    1.20 +        reserve_bootmem(0, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1));
    1.21  }
    1.22  #else
    1.23  static void __init contig_initmem_init(void)