ia64/xen-unstable

changeset 8911:17adc9c5984a

[IA64] bug fix reserve_memory()

reserved_region[].start is of virtual address in identity
mapping. not physical address.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Fri Feb 24 08:44:34 2006 -0700 (2006-02-24)
parents 0bd35cce6611
children 74bb3750f48e
files linux-2.6-xen-sparse/arch/ia64/kernel/setup.c linux-2.6-xen-sparse/include/asm-ia64/meminit.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Fri Feb 24 08:41:21 2006 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Fri Feb 24 08:44:34 2006 -0700
     1.3 @@ -247,9 +247,11 @@ reserve_memory (void)
     1.4  	n++;
     1.5  
     1.6  #ifdef CONFIG_XEN
     1.7 -	rsvd_region[n].start = (unsigned long) (HYPERVISOR_shared_info->arch.start_info_pfn << PAGE_SHIFT);
     1.8 -	rsvd_region[n].end   = rsvd_region[n].start + PAGE_SIZE;
     1.9 -	n++;
    1.10 +	if (running_on_xen) {
    1.11 +		rsvd_region[n].start = (unsigned long)__va((HYPERVISOR_shared_info->arch.start_info_pfn << PAGE_SHIFT));
    1.12 +		rsvd_region[n].end   = rsvd_region[n].start + PAGE_SIZE;
    1.13 +		n++;
    1.14 + 	}
    1.15  #endif
    1.16  
    1.17  #ifdef CONFIG_BLK_DEV_INITRD
    1.18 @@ -269,6 +271,7 @@ reserve_memory (void)
    1.19  	n++;
    1.20  
    1.21  	num_rsvd_regions = n;
    1.22 +	BUG_ON(IA64_MAX_RSVD_REGIONS + 1 < n);
    1.23  
    1.24  	sort_regions(rsvd_region, num_rsvd_regions);
    1.25  }
     2.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/meminit.h	Fri Feb 24 08:41:21 2006 -0700
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/meminit.h	Fri Feb 24 08:44:34 2006 -0700
     2.3 @@ -17,10 +17,15 @@
     2.4   * 	- command line string
     2.5   * 	- kernel code & data
     2.6   * 	- Kernel memory map built from EFI memory map
     2.7 + *	- xen start info
     2.8   *
     2.9   * More could be added if necessary
    2.10   */
    2.11 +#ifndef CONFIG_XEN
    2.12  #define IA64_MAX_RSVD_REGIONS 6
    2.13 +#else
    2.14 +#define IA64_MAX_RSVD_REGIONS 7
    2.15 +#endif
    2.16  
    2.17  struct rsvd_region {
    2.18  	unsigned long start;	/* virtual address of beginning of element */