ia64/xen-unstable

changeset 123:946e29624b77

bitkeeper revision 1.22.2.1 (3e428abeBVF1J00dtGMWKqQjaRgvkA)

mm.h, memory.c:
Fix compiler warning.
author kaf24@labyrinth.cl.cam.ac.uk
date Thu Feb 06 16:18:06 2003 +0000 (2003-02-06)
parents 658b3aeca0e5
children b591e70eec1d
files xen-2.4.16/common/memory.c xen-2.4.16/include/xeno/mm.h
line diff
     1.1 --- a/xen-2.4.16/common/memory.c	Tue Feb 04 22:08:19 2003 +0000
     1.2 +++ b/xen-2.4.16/common/memory.c	Thu Feb 06 16:18:06 2003 +0000
     1.3 @@ -227,17 +227,17 @@ void __init init_frametable(unsigned lon
     1.4      frame_table = (frame_table_t *)FRAMETABLE_VIRT_START;
     1.5      memset(frame_table, 0, frame_table_size);
     1.6  
     1.7 -    free_pfns = nr_pages - 
     1.8 -        ((__pa(frame_table) + frame_table_size) >> PAGE_SHIFT);
     1.9 +    free_pfns = 0;
    1.10  
    1.11      /* Put all domain-allocatable memory on a free list. */
    1.12      INIT_LIST_HEAD(&free_list);
    1.13 -    for( page_index = (__pa(frame_table) + frame_table_size) >> PAGE_SHIFT; 
    1.14 -         page_index < nr_pages; 
    1.15 -         page_index++ )      
    1.16 +    for( page_index = nr_pages - 1;
    1.17 +         page_index >= (__pa(frame_table) + frame_table_size) >> PAGE_SHIFT; 
    1.18 +         page_index -= 2 )      
    1.19      {
    1.20          pf = list_entry(&frame_table[page_index].list, struct pfn_info, list);
    1.21          list_add_tail(&pf->list, &free_list);
    1.22 +        free_pfns++;
    1.23      }
    1.24  }
    1.25  
     2.1 --- a/xen-2.4.16/include/xeno/mm.h	Tue Feb 04 22:08:19 2003 +0000
     2.2 +++ b/xen-2.4.16/include/xeno/mm.h	Thu Feb 06 16:18:06 2003 +0000
     2.3 @@ -118,6 +118,7 @@ void init_frametable(unsigned long nr_pa
     2.4   * will use it to store a "physical" frame number to give the appearance of
     2.5   * contiguous (or near contiguous) physical memory.
     2.6   */
     2.7 +#undef  machine_to_phys_mapping
     2.8  #define machine_to_phys_mapping ((unsigned long *)RDWR_MPT_VIRT_START)
     2.9  
    2.10  /* Part of the domain API. */