ia64/xen-unstable

changeset 5753:9f6057761c8f

Fix DMA compile for x86_64.
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jul 12 13:19:10 2005 +0000 (2005-07-12)
parents c5db6fd54e36
children 12edc2f2ca18
files linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c	Tue Jul 12 10:29:46 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c	Tue Jul 12 13:19:10 2005 +0000
     1.3 @@ -231,7 +231,7 @@ dma_map_single(struct device *dev, void 
     1.4  	 * boundary. Take into account buffer start offset. All other calls are
     1.5  	 * conservative and always search the dma_map list if it's non-empty.
     1.6  	 */
     1.7 -	if ((((unsigned int)ptr & ~PAGE_MASK) + size) <= PAGE_SIZE) {
     1.8 +	if (((((unsigned long)ptr) & ~PAGE_MASK) + size) <= PAGE_SIZE) {
     1.9  		dma = virt_to_bus(ptr);
    1.10  	} else {
    1.11  		BUG_ON((bnc = dma_alloc_coherent(dev, size, &dma, 0)) == NULL);
    1.12 @@ -247,7 +247,7 @@ dma_map_single(struct device *dev, void 
    1.13  		spin_unlock_irqrestore(&dma_map_lock, flags);
    1.14  	}
    1.15  
    1.16 -	if ((dma+size) & ~*hwdev->dma_mask)
    1.17 +	if ((dma+size) & ~*dev->dma_mask)
    1.18  		out_of_line_bug();
    1.19  	return dma;
    1.20  }
     2.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h	Tue Jul 12 10:29:46 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h	Tue Jul 12 13:19:10 2005 +0000
     2.3 @@ -22,20 +22,20 @@ void dma_free_coherent(struct device *de
     2.4  			 dma_addr_t dma_handle);
     2.5  
     2.6  extern dma_addr_t dma_map_single(struct device *hwdev, void *ptr, size_t size,
     2.7 -				 int direction);
     2.8 +				 enum dma_data_direction direction);
     2.9  extern void dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
    2.10 -			     int direction);
    2.11 +			     enum dma_data_direction direction);
    2.12  
    2.13  #define dma_map_page(dev,page,offset,size,dir) \
    2.14  	dma_map_single((dev), page_address(page)+(offset), (size), (dir))
    2.15  
    2.16  extern void
    2.17  dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
    2.18 -			int direction);
    2.19 +			enum dma_data_direction direction);
    2.20  
    2.21  extern void
    2.22  dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
    2.23 -                           int direction);
    2.24 +                           enum dma_data_direction direction);
    2.25  
    2.26  static inline void dma_sync_sg_for_cpu(struct device *hwdev,
    2.27  				       struct scatterlist *sg,