3.1-testing ia64 patches
PATCH 1/1 3.1-testing ia64 patches
Hi Keir,
The two patches attached are necessary for ia64 in the 3.1-testing
tree. We make use of the x86 pci-dma-xen.c in this code based, but our pfn_to_mfn() doesn't provide the true machine frame. Instead we need pfn_to_mfn_for_dma(). On current upstream, we've created our own files for this and we've made the corresponding update in ia64/linux-2.6.18-xen.hg. For this backport, the easiest approach seems to be to redefine pfn_to_mfn() for ia64 in this file. The other patch simply backports the addition of the paddr_t typedef. Thanks,
Alex
[IA64] avoid unnecessarily SWIOTLB bounce buffering
x86 improved range_straddles_page_boundary() by the c/s 501:5486a234923d. The same discussion applies to ia64. This patch is ia64 counter part of it.
linux-2.6.18-xen changeset: ec6e3e18ea314e9520ee6bba898e30228bf3bda4 linux-2.6.18-xen date: Wed Apr 02 10:02:57 2008 -0600
linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c +5 -0
@@ -74,6 +74,11 @@ do { \BUG (); \ } \ } while (0) + +#ifdef __ia64__ +#undef pfn_to_mfn +#define pfn_to_mfn pfn_to_mfn_for_dma +#endif static int check_pages_physically_contiguous(unsigned long pfn, unsigned int offset,
linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h +1 -7
@@ -124,13 +124,7 @@ address_needs_mapping(struct device *hwdreturn (addr & ~mask) !=0 ; } -static inline int -range_straddles_page_boundary (void *p,size_t size) -{ -extern unsigned long *contiguous_bitmap; -return (((((unsigned long )p & ~PAGE_MASK ) + size) >PAGE_SIZE ) && - !test_bit (__pa (p) >>PAGE_SHIFT , contiguous_bitmap)); -} +extern int range_straddles_page_boundary (paddr_t p,size_t size);#endif #endif /* _ASM_IA64_DMA_MAPPING_H */
# HG changeset patch
# User Alex Williamson <[email protected]> # Date 1181684430 21600
# Node ID 50306c16650087922da4b54b4d222cfd8d17697a # Parent 245902ee7ce0c1499c172b3a9240b8e2ede45a5f [IA64] Define paddr_t.
Temporary build workaround
linux-2.6.18-xen changeset: 51:50306c16650087922da4b54b4d222cfd8d17697a linux-2.6.18-xen date: Tue Jun 12 15:40:30 2007 -0600
linux-2.6-xen-sparse/include/asm-ia64/maddr.h +1 -0
@@ -103,5 +104,6 @@ mfn_to_local_pfn(unsigned long mfn)#define set_phys_to_machine (pfn, mfn) do { } while (0)typedef unsigned long maddr_t ;// to compile netback, netfront +typedef unsigned long paddr_t ;#endif /* _ASM_IA64_MADDR_H */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel