direct-io.hg

changeset 15459:842e085dbb77

xen: Fix my changes to I/O-region-finding routine.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jul 03 13:44:04 2007 +0100 (2007-07-03)
parents 8adfd96f62ae
children b8e8061c5a98
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Tue Jul 03 12:04:03 2007 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Tue Jul 03 13:44:04 2007 +0100
     1.3 @@ -211,13 +211,12 @@ void __init arch_init_memory(void)
     1.4          share_xen_page_with_guest(mfn_to_page(i), dom_io, XENSHARE_writable);
     1.5   
     1.6      /* Any areas not specified as RAM by the e820 map are considered I/O. */
     1.7 -    pfn = i = 0;
     1.8 -    while ( pfn < max_page )
     1.9 +    for ( i = 0, pfn = 0; pfn < max_page; i++ )
    1.10      {
    1.11          while ( (i < e820.nr_map) && (e820.map[i].type != E820_RAM) )
    1.12              i++;
    1.13  
    1.14 -        if ( i == e820.nr_map )
    1.15 +        if ( i >= e820.nr_map )
    1.16          {
    1.17              /* No more RAM regions: mark as I/O right to end of memory map. */
    1.18              rstart_pfn = rend_pfn = max_page;