WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[PATCH] add paddr_t definition to compile gnttab.c (was Re: [Xen-ia64-de

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [PATCH] add paddr_t definition to compile gnttab.c (was Re: [Xen-ia64-devel] [RFC] gnttab unmap_and_replace)
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 8 Jun 2007 19:54:18 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 08 Jun 2007 03:52:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1181064917.6221.224.camel@bling>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070605142710.GB25309%yamahata@xxxxxxxxxxxxx> <1181064917.6221.224.camel@bling>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
add paddr_t definition to compile gnttab.c

On Tue, Jun 05, 2007 at 11:35:17AM -0600, Alex Williamson wrote:
> 
>    We could typedef paddr_t as we've done for maddr_t.  We may continue
> to get broken by such changes in the future otherwise.  The pfn_valid()
> change doesn't seem like it should be controversial.  Thanks,
> 
>       Alex
> 
> On Tue, 2007-06-05 at 23:27 +0900, Isaku Yamahata wrote:
> > # HG changeset patch
> > # User yamahata@xxxxxxxxxxxxx
> > # Date 1181025843 -32400
> > # Node ID 552f999fcc091457228322c3b58cd924508bfad3
> > # Parent  a5751c102cf35e7a2cf4b490a151c73a67cd934b
> > compilation fix.
> > - for pfn, unsigned long should be used. not paddr_t.
> >   paddr_t is only defined on x86 and for guest physical address.
> > - use pfn_valid() instead of max_mapnr.
> > PATCHNAME: compilation_fix_of_gnttab_c
> > 
> > Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
> > 
> > diff -r a5751c102cf3 -r 552f999fcc09
> > linux-2.6-xen-sparse/drivers/xen/core/gnttab.c
> > --- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Tue Jun 05
> > 15:07:45 2007 +0900
> > +++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Tue Jun 05
> > 15:44:03 2007 +0900
> > @@ -516,7 +516,7 @@ int gnttab_copy_grant_page(grant_ref_t r
> >         struct page *new_page;
> >         void *new_addr;
> >         void *addr;
> > -       paddr_t pfn;
> > +       unsigned long pfn;
> >         maddr_t mfn;
> >         maddr_t new_mfn;
> >         int err;
> > @@ -598,7 +598,7 @@ maddr_t gnttab_dma_map_page(struct page 
> >         if (!PageForeign(page))
> >                 return mfn << PAGE_SHIFT;
> >  
> > -       if (mfn_to_local_pfn(mfn) < max_mapnr)
> > +       if (pfn_valid(mfn_to_local_pfn(mfn)))
> >                 return mfn << PAGE_SHIFT;
> >  
> >         atomic_set(&page->_mapcount, 0);
> > 
> -- 
> Alex Williamson                             HP Open Source & Linux Org.
> 
> 
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel
> 

-- 
yamahata

Attachment: 15278_a0d44f3c475f_paddr_t.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel