ia64/xen-unstable

changeset 14092:eb3ebf11abfe

xen: Fix dumb boot allocator breakage that prevents loop termination
in some cases. :-)
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Feb 23 14:36:33 2007 +0000 (2007-02-23)
parents 8bcaedc68f5a
children 2c3a13993b0d
files xen/common/page_alloc.c
line diff
     1.1 --- a/xen/common/page_alloc.c	Fri Feb 23 12:58:20 2007 +0000
     1.2 +++ b/xen/common/page_alloc.c	Fri Feb 23 14:36:33 2007 +0000
     1.3 @@ -262,9 +262,9 @@ unsigned long alloc_boot_low_pages(
     1.4      unsigned long pg, i;
     1.5  
     1.6      /* Search forwards to obtain lowest available range. */
     1.7 -    for ( pg = first_valid_mfn & ~(pfn_align-1);
     1.8 -          (pg + nr_pfns) < max_page;
     1.9 -          pg = (pg + i + pfn_align - 1) & ~(pfn_align - 1) )
    1.10 +    for ( pg = first_valid_mfn & ~(pfn_align - 1);
    1.11 +          (pg + nr_pfns) <= max_page;
    1.12 +          pg = (pg + i + pfn_align) & ~(pfn_align - 1) )
    1.13      {
    1.14          for ( i = 0; i < nr_pfns; i++ )
    1.15              if ( allocated_in_map(pg+i) )