[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [IA64] fix INVALID_M2P_ENTRY and INVALID_M2P macro



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID c870c7f66abc1f88d9b7532e61f02a6688df183b
# Parent  983311b895bebff38f5a4c10cd84dff64764a787
[IA64] fix INVALID_M2P_ENTRY and INVALID_M2P macro

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 983311b895be -r c870c7f66abc xen/arch/ia64/xen/xenmem.c
--- a/xen/arch/ia64/xen/xenmem.c        Fri Mar  3 20:03:39 2006
+++ b/xen/arch/ia64/xen/xenmem.c        Mon Mar  6 16:01:43 2006
@@ -35,6 +35,8 @@
 paging_init (void)
 {
        unsigned int mpt_order;
+       unsigned long i;
+
        /* Create machine to physical mapping table
         * NOTE: similar to frame table, later we may need virtually
         * mapped mpt table if large hole exists. Also MAX_ORDER needs
@@ -47,7 +49,9 @@
                panic("Not enough memory to bootstrap Xen.\n");
 
        printk("machine to physical table: 0x%lx\n", (u64)mpt_table);
-       memset(mpt_table, INVALID_M2P_ENTRY, mpt_table_size);
+       for (i = 0; i < (1UL << mpt_order); i++) {
+               mpt_table[i] = INVALID_M2P_ENTRY;
+       }
        /* Other mapping setup */
 
        zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
diff -r 983311b895be -r c870c7f66abc xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h Fri Mar  3 20:03:39 2006
+++ b/xen/include/asm-ia64/mm.h Mon Mar  6 16:01:43 2006
@@ -414,8 +414,8 @@
 #undef machine_to_phys_mapping
 #define machine_to_phys_mapping        mpt_table
 
-#define INVALID_M2P_ENTRY        (~0U)
-#define VALID_M2P(_e)            (!((_e) & (1U<<63)))
+#define INVALID_M2P_ENTRY        (~0UL)
+#define VALID_M2P(_e)            (!((_e) & (1UL<<63)))
 #define IS_INVALID_M2P_ENTRY(_e) (!VALID_M2P(_e))
 
 #define set_gpfn_from_mfn(mfn, pfn) (machine_to_phys_mapping[(mfn)] = (pfn))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.