ia64/xen-unstable

changeset 9082:c870c7f66abc

[IA64] fix INVALID_M2P_ENTRY and INVALID_M2P macro

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Mon Mar 06 09:01:43 2006 -0700 (2006-03-06)
parents 983311b895be
children c668c6abb5f0
files xen/arch/ia64/xen/xenmem.c xen/include/asm-ia64/mm.h
line diff
     1.1 --- a/xen/arch/ia64/xen/xenmem.c	Fri Mar 03 13:03:39 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/xenmem.c	Mon Mar 06 09:01:43 2006 -0700
     1.3 @@ -35,6 +35,8 @@ void
     1.4  paging_init (void)
     1.5  {
     1.6  	unsigned int mpt_order;
     1.7 +	unsigned long i;
     1.8 +
     1.9  	/* Create machine to physical mapping table
    1.10  	 * NOTE: similar to frame table, later we may need virtually
    1.11  	 * mapped mpt table if large hole exists. Also MAX_ORDER needs
    1.12 @@ -47,7 +49,9 @@ paging_init (void)
    1.13  		panic("Not enough memory to bootstrap Xen.\n");
    1.14  
    1.15  	printk("machine to physical table: 0x%lx\n", (u64)mpt_table);
    1.16 -	memset(mpt_table, INVALID_M2P_ENTRY, mpt_table_size);
    1.17 +	for (i = 0; i < (1UL << mpt_order); i++) {
    1.18 +		mpt_table[i] = INVALID_M2P_ENTRY;
    1.19 +	}
    1.20  	/* Other mapping setup */
    1.21  
    1.22  	zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
     2.1 --- a/xen/include/asm-ia64/mm.h	Fri Mar 03 13:03:39 2006 -0700
     2.2 +++ b/xen/include/asm-ia64/mm.h	Mon Mar 06 09:01:43 2006 -0700
     2.3 @@ -414,8 +414,8 @@ extern unsigned long lookup_domain_mpa(s
     2.4  #undef machine_to_phys_mapping
     2.5  #define machine_to_phys_mapping	mpt_table
     2.6  
     2.7 -#define INVALID_M2P_ENTRY        (~0U)
     2.8 -#define VALID_M2P(_e)            (!((_e) & (1U<<63)))
     2.9 +#define INVALID_M2P_ENTRY        (~0UL)
    2.10 +#define VALID_M2P(_e)            (!((_e) & (1UL<<63)))
    2.11  #define IS_INVALID_M2P_ENTRY(_e) (!VALID_M2P(_e))
    2.12  
    2.13  #define set_gpfn_from_mfn(mfn, pfn) (machine_to_phys_mapping[(mfn)] = (pfn))