From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH] 3.1-testing ia64 patches Date: Wed, 02 Apr 2008 21:18:20 -0600 Message-ID: <1207192700.14520.154.camel@bling> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-sXKLc4IHBLoEbkdFRv2l" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel , xen-ia64-devel List-Id: xen-devel@lists.xenproject.org --=-sXKLc4IHBLoEbkdFRv2l Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-sXKLc4IHBLoEbkdFRv2l Content-Disposition: attachment; filename=ia64_check_pages_physically_contiguous.patch Content-Type: text/x-patch; name=ia64_check_pages_physically_contiguous.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit [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. [ported from mainline version] Signed-off-by: Alex Williamson linux-2.6.18-xen changeset: ec6e3e18ea314e9520ee6bba898e30228bf3bda4 linux-2.6.18-xen date: Wed Apr 02 10:02:57 2008 -0600 diff -r cdca34378e8e 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 Mon Mar 31 18:09:19 2008 +0100 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c Wed Apr 02 21:00:10 2008 -0600 @@ -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 cdca34378e8e linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h --- a/linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h Mon Mar 31 18:09:19 2008 +0100 +++ b/linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h Wed Apr 02 21:00:10 2008 -0600 @@ -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 */ --=-sXKLc4IHBLoEbkdFRv2l Content-Disposition: attachment; filename=paddr.patch Content-Type: text/x-patch; name=paddr.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit # HG changeset patch # User Alex Williamson # Date 1181684430 21600 # Node ID 50306c16650087922da4b54b4d222cfd8d17697a # Parent 245902ee7ce0c1499c172b3a9240b8e2ede45a5f [IA64] Define paddr_t. Temporary build workaround Signed-off-by: Isaku Yamahata linux-2.6.18-xen changeset: 51:50306c16650087922da4b54b4d222cfd8d17697a linux-2.6.18-xen date: Tue Jun 12 15:40:30 2007 -0600 diff -r 245902ee7ce0 -r 50306c166500 include/asm-ia64/maddr.h --- a/linux-2.6-xen-sparse/include/asm-ia64/maddr.h Mon Jun 11 14:59:53 2007 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h Tue Jun 12 15:40:30 2007 -0600 @@ -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 */ --=-sXKLc4IHBLoEbkdFRv2l Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-sXKLc4IHBLoEbkdFRv2l--