direct-io.hg
changeset 8811:2ca9bb802ff7
pci-nommu-xen.c is identical to its mainline counterpart so remove it.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Feb 09 23:15:21 2006 +0100 (2006-02-09) |
parents | 754079886035 |
children | 9b62efbc881a |
files |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c Thu Feb 09 20:25:33 2006 +0100 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,99 +0,0 @@ 1.4 -/* Fallback functions when the main IOMMU code is not compiled in. This 1.5 - code is roughly equivalent to i386. */ 1.6 -#include <linux/mm.h> 1.7 -#include <linux/init.h> 1.8 -#include <linux/pci.h> 1.9 -#include <linux/string.h> 1.10 -#include <asm/proto.h> 1.11 -#include <asm/processor.h> 1.12 -#include <asm/dma.h> 1.13 - 1.14 -static int 1.15 -check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) 1.16 -{ 1.17 - if (hwdev && bus + size > *hwdev->dma_mask) { 1.18 - printk(KERN_ERR 1.19 - "nommu_%s: overflow %Lx+%lu of device mask %Lx\n", 1.20 - name, (long long)bus, size, (long long)*hwdev->dma_mask); 1.21 - return 0; 1.22 - } 1.23 - return 1; 1.24 -} 1.25 - 1.26 -static dma_addr_t 1.27 -nommu_map_single(struct device *hwdev, void *ptr, size_t size, 1.28 - int direction) 1.29 -{ 1.30 - dma_addr_t bus = virt_to_bus(ptr); 1.31 - if (!check_addr("map_single", hwdev, bus, size)) 1.32 - return bad_dma_address; 1.33 - return bus; 1.34 -} 1.35 - 1.36 -void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size, 1.37 - int direction) 1.38 -{ 1.39 -} 1.40 - 1.41 -/* Map a set of buffers described by scatterlist in streaming 1.42 - * mode for DMA. This is the scatter-gather version of the 1.43 - * above pci_map_single interface. Here the scatter gather list 1.44 - * elements are each tagged with the appropriate dma address 1.45 - * and length. They are obtained via sg_dma_{address,length}(SG). 1.46 - * 1.47 - * NOTE: An implementation may be able to use a smaller number of 1.48 - * DMA address/length pairs than there are SG table elements. 1.49 - * (for example via virtual mapping capabilities) 1.50 - * The routine returns the number of addr/length pairs actually 1.51 - * used, at most nents. 1.52 - * 1.53 - * Device ownership issues as mentioned above for pci_map_single are 1.54 - * the same here. 1.55 - */ 1.56 -int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, 1.57 - int nents, int direction) 1.58 -{ 1.59 - int i; 1.60 - 1.61 - BUG_ON(direction == DMA_NONE); 1.62 - for (i = 0; i < nents; i++ ) { 1.63 - struct scatterlist *s = &sg[i]; 1.64 - BUG_ON(!s->page); 1.65 - s->dma_address = virt_to_bus(page_address(s->page) +s->offset); 1.66 - if (!check_addr("map_sg", hwdev, s->dma_address, s->length)) 1.67 - return 0; 1.68 - s->dma_length = s->length; 1.69 - } 1.70 - return nents; 1.71 -} 1.72 - 1.73 -/* Unmap a set of streaming mode DMA translations. 1.74 - * Again, cpu read rules concerning calls here are the same as for 1.75 - * pci_unmap_single() above. 1.76 - */ 1.77 -void nommu_unmap_sg(struct device *dev, struct scatterlist *sg, 1.78 - int nents, int dir) 1.79 -{ 1.80 -} 1.81 - 1.82 -struct dma_mapping_ops nommu_dma_ops = { 1.83 - .map_single = nommu_map_single, 1.84 - .unmap_single = nommu_unmap_single, 1.85 - .map_sg = nommu_map_sg, 1.86 - .unmap_sg = nommu_unmap_sg, 1.87 - .is_phys = 1, 1.88 -}; 1.89 - 1.90 -void __init no_iommu_init(void) 1.91 -{ 1.92 - if (dma_ops) 1.93 - return; 1.94 - printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); 1.95 - dma_ops = &nommu_dma_ops; 1.96 - if (end_pfn > MAX_DMA32_PFN) { 1.97 - printk(KERN_ERR 1.98 - "WARNING more than 4GB of memory but IOMMU not compiled in.\n" 1.99 - KERN_ERR "WARNING 32bit PCI may malfunction.\n" 1.100 - KERN_ERR "You might want to enable CONFIG_GART_IOMMU\n"); 1.101 - } 1.102 -}