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

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

To: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Patch][RFC] buildconfigs of supportingSPARSEMEM
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 1 Feb 2007 21:04:31 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 01 Feb 2007 04:03:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <14C745D79BC922takebe_akio@xxxxxxxxxxxxxx>
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: <FDC7444E6F1932takebe_akio@xxxxxxxxxxxxxx> <1170271033.10792.210.camel@bling> <14C745D79BC922takebe_akio@xxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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

<Prev in Thread] Current Thread [Next in Thread>