|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-ia64-devel] [Patch][RFC] buildconfigs of supportingSPARSEMEM
Hi, Alex and Isaku
I'm trying to fix the warning caused by setting SPARSEMEM.
In the case of x86 code, the following check is used instead of pfn_valid().
static inline unsigned long mfn_to_local_pfn(unsigned long mfn)
{
unsigned long pfn = mfn_to_pfn(mfn);
if ((pfn < end_pfn)
&& !xen_feature(XENFEAT_auto_translated_physmap)
&& (phys_to_machine_mapping[pfn] != mfn))
return end_pfn; /* force !pfn_valid() */
return pfn;
}
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?
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;
}
Best Regards,
Akio Takeeb
>Hi Akio,
>
> These end with a build error for me, so I think they should be
>cleaned up before this goes in the tree. Thanks,
>
> Alex
>
>--
>Alex Williamson HP Open Source & Linux Org.
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-ia64-devel] [Patch][RFC] buildconfigs of supportingSPARSEMEM,
Akio Takebe <=
|
|
|
|
|