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-changelog

[Xen-changelog] Fix DMA compile for x86_64.

# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 9f6057761c8f485b1948fdd3308ae10e3ea66ad5
# Parent  c5db6fd54e36fb4475257172c3f1c8fa77b54745

Fix DMA compile for x86_64.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>

diff -r c5db6fd54e36 -r 9f6057761c8f 
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h     Tue Jul 
12 10:29:46 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h     Tue Jul 
12 13:19:10 2005
@@ -22,20 +22,20 @@
                         dma_addr_t dma_handle);
 
 extern dma_addr_t dma_map_single(struct device *hwdev, void *ptr, size_t size,
-                                int direction);
+                                enum dma_data_direction direction);
 extern void dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
-                            int direction);
+                            enum dma_data_direction direction);
 
 #define dma_map_page(dev,page,offset,size,dir) \
        dma_map_single((dev), page_address(page)+(offset), (size), (dir))
 
 extern void
 dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
-                       int direction);
+                       enum dma_data_direction direction);
 
 extern void
 dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t 
size,
-                           int direction);
+                           enum dma_data_direction direction);
 
 static inline void dma_sync_sg_for_cpu(struct device *hwdev,
                                       struct scatterlist *sg,
diff -r c5db6fd54e36 -r 9f6057761c8f 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c     Tue Jul 12 
10:29:46 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c     Tue Jul 12 
13:19:10 2005
@@ -231,7 +231,7 @@
         * boundary. Take into account buffer start offset. All other calls are
         * conservative and always search the dma_map list if it's non-empty.
         */
-       if ((((unsigned int)ptr & ~PAGE_MASK) + size) <= PAGE_SIZE) {
+       if (((((unsigned long)ptr) & ~PAGE_MASK) + size) <= PAGE_SIZE) {
                dma = virt_to_bus(ptr);
        } else {
                BUG_ON((bnc = dma_alloc_coherent(dev, size, &dma, 0)) == NULL);
@@ -247,7 +247,7 @@
                spin_unlock_irqrestore(&dma_map_lock, flags);
        }
 
-       if ((dma+size) & ~*hwdev->dma_mask)
+       if ((dma+size) & ~*dev->dma_mask)
                out_of_line_bug();
        return dma;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix DMA compile for x86_64., Xen patchbot -unstable <=