xen-unstable.hg

changeset 9745:9df603eff58a

xenLinux/ia64 has its own dma_map_page(), dma_unmap_page(), and it needs
linux default implementations of dma_declare_coheremnt_memory() and its
families which is defined in include/linux/dma-mapping.h.
So those in pci-dma-xen.c are unnecessary. #ifdef out them.
PATCHNAME: pci-dma-xen-common

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author yamahata@valinux.co.jp
date Wed Apr 26 10:43:16 2006 +0100 (2006-04-26)
parents 1ad06bd6832d
children 1d69cff40b8c
files linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c	Tue Apr 25 18:22:11 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c	Wed Apr 26 10:43:16 2006 +0100
     1.3 @@ -93,6 +93,13 @@ dma_unmap_sg(struct device *hwdev, struc
     1.4  }
     1.5  EXPORT_SYMBOL(dma_unmap_sg);
     1.6  
     1.7 +/*
     1.8 + * XXX This file is also used by xenLinux/ia64. 
     1.9 + * "defined(__i386__) || defined (__x86_64__)" means "!defined(__ia64__)".
    1.10 + * This #if work around should be removed once this file is merbed back into
    1.11 + * i386' pci-dma or is moved to drivers/xen/core.
    1.12 + */
    1.13 +#if defined(__i386__) || defined(__x86_64__)
    1.14  dma_addr_t
    1.15  dma_map_page(struct device *dev, struct page *page, unsigned long offset,
    1.16  	     size_t size, enum dma_data_direction direction)
    1.17 @@ -122,6 +129,7 @@ dma_unmap_page(struct device *dev, dma_a
    1.18  		swiotlb_unmap_page(dev, dma_address, size, direction);
    1.19  }
    1.20  EXPORT_SYMBOL(dma_unmap_page);
    1.21 +#endif /* defined(__i386__) || defined(__x86_64__) */
    1.22  
    1.23  int
    1.24  dma_mapping_error(dma_addr_t dma_addr)
    1.25 @@ -204,6 +212,7 @@ void dma_free_coherent(struct device *de
    1.26  }
    1.27  EXPORT_SYMBOL(dma_free_coherent);
    1.28  
    1.29 +#ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
    1.30  int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
    1.31  				dma_addr_t device_addr, size_t size, int flags)
    1.32  {
    1.33 @@ -280,6 +289,7 @@ void *dma_mark_declared_memory_occupied(
    1.34  	return mem->virt_base + (pos << PAGE_SHIFT);
    1.35  }
    1.36  EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
    1.37 +#endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
    1.38  
    1.39  dma_addr_t
    1.40  dma_map_single(struct device *dev, void *ptr, size_t size,