[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] [Patch][RFC] buildconfigs of supportingSPARSEMEM



On Thu, Feb 01, 2007 at 05:04:33PM +0900, Akio Takebe wrote:
> mfn_to_local_pfn() is called only by in_swiotlb_aperture().
> in_swiotlb_aperture() check pfn_valid(),
> so I fix by the following way, what do you think?

It seems caller's responsibility to check by pfn_valid().
So simple return mfn_to_pfn_for_dma(mfn) is ok instead of
#ifndef CONFIG_SPARSEMEM.
Adding comment is good thing.

> diff -r ef646312685f linux-2.6-xen-sparse/include/asm-ia64/maddr.h
> --- a/linux-2.6-xen-sparse/include/asm-ia64/maddr.h     Wed Jan 31 10:59:56 
> 2007 -0700
> +++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h     Fri Feb 02 01:08:01 
> 2007 +0900
> @@ -69,8 +69,11 @@ mfn_to_local_pfn(unsigned long mfn)
>  mfn_to_local_pfn(unsigned long mfn)
>  {
>         unsigned long pfn = mfn_to_pfn_for_dma(mfn);
> +#ifndef CONFIG_SPARSEMEM
>         if (!pfn_valid(pfn))
>                 return INVALID_P2M_ENTRY;
> +#endif
> +/* we should pfn_valid() in caller function if SARSEMEM. */
>         return pfn;
>  }

-- 
yamahata

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.