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

[Xen-changelog] [xen-3.1-testing] [IA64] avoid unnecessarily SWIOTLB bounce buffering



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1207219231 -3600
# Node ID 74938d1000590600974a0bdc2a5c711106b77623
# Parent  9abed211fdc64e9f3722dfbf21b6420fb5e30a47
[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.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
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 +++++
 linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h |    8 +-------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff -r 9abed211fdc6 -r 74938d100059 
linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c       Thu Apr 03 
11:39:47 2008 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c       Thu Apr 03 
11:40:31 2008 +0100
@@ -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,
diff -r 9abed211fdc6 -r 74938d100059 
linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h       Thu Apr 03 
11:39:47 2008 +0100
+++ b/linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h       Thu Apr 03 
11:40:31 2008 +0100
@@ -124,13 +124,7 @@ address_needs_mapping(struct device *hwd
        return (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 */

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


 


Rackspace

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