WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xen/arch/x86/x86_32/mm.c

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xen/arch/x86/x86_32/mm.c
From: Jerone Young <jyoung5@xxxxxxxxxx>
Date: Thu, 11 Aug 2005 16:15:31 -0500
Delivery-date: Thu, 11 Aug 2005 21:17:29 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Well this is a bug. Iterator i is being used in both top & embeded for
loops. 

Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>

--- xen/arch/x86/x86_32/mm.c.old        2005-08-11 13:53:44.000000000
-0500
+++ xen/arch/x86/x86_32/mm.c    2005-08-11 13:55:20.000000000 -0500
@@ -67,7 +67,7 @@ void __init paging_init(void)
     void *ioremap_pt;
     unsigned long v;
     struct pfn_info *pg;
-    int i, mapcache_order;
+    int i,n,mapcache_order;

#ifdef CONFIG_X86_PAE
     printk("PAE enabled, limit: %d GB\n", MACHPHYS_MBYTES);
@@ -170,10 +170,10 @@ void subarch_init_memory(struct domain *
     }

     /* M2P table is mappable read-only by privileged domains. */
-    for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ )
+    for ( n = 0; n < (mpt_size >> L2_PAGETABLE_SHIFT); n++ )
     {
         m2p_start_mfn = l2e_get_pfn(
-            idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) +
i]);
+            idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) +
n]);
         for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ )
         {
             frame_table[m2p_start_mfn+i].count_info = PGC_allocated |
1;


-- 
Jerone Young
IBM Linux Technology Center
jyoung5@xxxxxxxxxx
512-838-1157 (T/L: 678-1157)


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

<Prev in Thread] Current Thread [Next in Thread>