From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] x86/shadow: struct page_info's type_info is now unsigned long, Date: Mon, 02 Feb 2009 15:26:52 +0000 Message-ID: <49871ECC.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org hence local variables of type u32 (and the more such with misleading names) must no longer be used. Signed-off-by: Jan Beulich --- 2009-01-30.orig/xen/arch/x86/mm/shadow/common.c 2009-01-30 = 10:19:35.000000000 +0100 +++ 2009-01-30/xen/arch/x86/mm/shadow/common.c 2009-02-02 16:22:06.0000000= 00 +0100 @@ -3663,7 +3663,6 @@ int shadow_track_dirty_vram(struct domai for ( i =3D 0; i < nr; i++ ) { mfn_t mfn =3D gfn_to_mfn(d, begin_pfn + i, &t); struct page_info *page; - u32 count_info; int dirty =3D 0; paddr_t sl1ma =3D d->dirty_vram->sl1ma[i]; =20 @@ -3674,8 +3673,7 @@ int shadow_track_dirty_vram(struct domai else { page =3D mfn_to_page(mfn); - count_info =3D page->u.inuse.type_info & PGT_count_mask; - switch (count_info) + switch (page->u.inuse.type_info & PGT_count_mask) { case 0: /* No guest reference, nothing to track. */ --- 2009-01-30.orig/xen/arch/x86/mm/shadow/multi.c 2009-01-30 = 10:19:35.000000000 +0100 +++ 2009-01-30/xen/arch/x86/mm/shadow/multi.c 2009-02-02 16:22:06.0000000= 00 +0100 @@ -1036,9 +1036,8 @@ static inline void shadow_vram_get_l1e(s if ( (gfn >=3D d->dirty_vram->begin_pfn) && (gfn < d->dirty_vram->end_= pfn) ) { unsigned long i =3D gfn - d->dirty_vram->begin_pfn; struct page_info *page =3D mfn_to_page(mfn); - u32 count_info =3D page->u.inuse.type_info & PGT_count_mask; =20 - if ( count_info =3D=3D 1 ) + if ( (page->u.inuse.type_info & PGT_count_mask) =3D=3D 1 ) /* Initial guest reference, record it */ d->dirty_vram->sl1ma[i] =3D pfn_to_paddr(mfn_x(sl1mfn)) | ((unsigned long)sl1e & ~PAGE_MASK); @@ -1064,12 +1063,11 @@ static inline void shadow_vram_put_l1e(s if ( (gfn >=3D d->dirty_vram->begin_pfn) && (gfn < d->dirty_vram->end_= pfn) ) { unsigned long i =3D gfn - d->dirty_vram->begin_pfn; struct page_info *page =3D mfn_to_page(mfn); - u32 count_info =3D page->u.inuse.type_info & PGT_count_mask; int dirty =3D 0; paddr_t sl1ma =3D pfn_to_paddr(mfn_x(sl1mfn)) | ((unsigned long)sl1e & ~PAGE_MASK); =20 - if ( count_info =3D=3D 1 ) { + if ( (page->u.inuse.type_info & PGT_count_mask) =3D=3D 1 ) { /* Last reference */ if ( d->dirty_vram->sl1ma[i] =3D=3D INVALID_PADDR ) { /* We didn't know it was that one, let's say it is dirty = */