ia64/xen-unstable

changeset 19146:2262fddac319

x86/shadow: struct page_info's type_info is now unsigned long,

hence local variables of type u32 (and the more such with misleading
names) must no longer be used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 03 14:03:32 2009 +0000 (2009-02-03)
parents 414373f007e8
children d68178692b7c
files xen/arch/x86/mm/shadow/common.c xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Mon Feb 02 09:21:04 2009 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Tue Feb 03 14:03:32 2009 +0000
     1.3 @@ -3659,7 +3659,6 @@ int shadow_track_dirty_vram(struct domai
     1.4          for ( i = 0; i < nr; i++ ) {
     1.5              mfn_t mfn = gfn_to_mfn(d, begin_pfn + i, &t);
     1.6              struct page_info *page;
     1.7 -            u32 count_info;
     1.8              int dirty = 0;
     1.9              paddr_t sl1ma = d->dirty_vram->sl1ma[i];
    1.10  
    1.11 @@ -3670,8 +3669,7 @@ int shadow_track_dirty_vram(struct domai
    1.12              else
    1.13              {
    1.14                  page = mfn_to_page(mfn);
    1.15 -                count_info = page->u.inuse.type_info & PGT_count_mask;
    1.16 -                switch (count_info)
    1.17 +                switch (page->u.inuse.type_info & PGT_count_mask)
    1.18                  {
    1.19                  case 0:
    1.20                      /* No guest reference, nothing to track. */
     2.1 --- a/xen/arch/x86/mm/shadow/multi.c	Mon Feb 02 09:21:04 2009 +0000
     2.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Tue Feb 03 14:03:32 2009 +0000
     2.3 @@ -1036,9 +1036,8 @@ static inline void shadow_vram_get_l1e(s
     2.4      if ( (gfn >= d->dirty_vram->begin_pfn) && (gfn < d->dirty_vram->end_pfn) ) {
     2.5          unsigned long i = gfn - d->dirty_vram->begin_pfn;
     2.6          struct page_info *page = mfn_to_page(mfn);
     2.7 -        u32 count_info = page->u.inuse.type_info & PGT_count_mask;
     2.8          
     2.9 -        if ( count_info == 1 )
    2.10 +        if ( (page->u.inuse.type_info & PGT_count_mask) == 1 )
    2.11              /* Initial guest reference, record it */
    2.12              d->dirty_vram->sl1ma[i] = pfn_to_paddr(mfn_x(sl1mfn))
    2.13                  | ((unsigned long)sl1e & ~PAGE_MASK);
    2.14 @@ -1064,12 +1063,11 @@ static inline void shadow_vram_put_l1e(s
    2.15      if ( (gfn >= d->dirty_vram->begin_pfn) && (gfn < d->dirty_vram->end_pfn) ) {
    2.16          unsigned long i = gfn - d->dirty_vram->begin_pfn;
    2.17          struct page_info *page = mfn_to_page(mfn);
    2.18 -        u32 count_info = page->u.inuse.type_info & PGT_count_mask;
    2.19          int dirty = 0;
    2.20          paddr_t sl1ma = pfn_to_paddr(mfn_x(sl1mfn))
    2.21              | ((unsigned long)sl1e & ~PAGE_MASK);
    2.22  
    2.23 -        if ( count_info == 1 ) {
    2.24 +        if ( (page->u.inuse.type_info & PGT_count_mask) == 1 ) {
    2.25              /* Last reference */
    2.26              if ( d->dirty_vram->sl1ma[i] == INVALID_PADDR ) {
    2.27                  /* We didn't know it was that one, let's say it is dirty */