|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
[PATCH] add paddr_t definition to compile gnttab.c (was Re: [Xen-ia64-de
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
15278_a0d44f3c475f_paddr_t.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
|
|
|
|