ia64/xen-unstable

view linux-2.6-xen-sparse/arch/x86_64/kernel/pci-swiotlb-xen.c @ 13647:057c4c2991fa

32-on-64: Fix an one-off error in compat_addr_ok().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@localhost.localdomain
date Fri Jan 26 13:36:52 2007 +0000 (2007-01-26)
parents 3adf00179a63
children
line source
1 /* Glue code to lib/swiotlb.c */
3 #include <linux/pci.h>
4 #include <linux/cache.h>
5 #include <linux/module.h>
6 #include <asm/dma-mapping.h>
7 #include <asm/proto.h>
8 #include <asm/swiotlb.h>
9 #include <asm/dma.h>
11 #if 0
12 int swiotlb __read_mostly;
13 EXPORT_SYMBOL(swiotlb);
14 #endif
16 struct dma_mapping_ops swiotlb_dma_ops = {
17 #if 0
18 .mapping_error = swiotlb_dma_mapping_error,
19 .alloc_coherent = swiotlb_alloc_coherent,
20 .free_coherent = swiotlb_free_coherent,
21 .map_single = swiotlb_map_single,
22 .unmap_single = swiotlb_unmap_single,
23 .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
24 .sync_single_for_device = swiotlb_sync_single_for_device,
25 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
26 .sync_single_range_for_device = swiotlb_sync_single_range_for_device,
27 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
28 .sync_sg_for_device = swiotlb_sync_sg_for_device,
29 .map_sg = swiotlb_map_sg,
30 .unmap_sg = swiotlb_unmap_sg,
31 .dma_supported = NULL,
32 #endif
33 };
35 void pci_swiotlb_init(void)
36 {
37 #if 0
38 /* don't initialize swiotlb if iommu=off (no_iommu=1) */
39 if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN)
40 swiotlb = 1;
41 if (swiotlb_force)
42 swiotlb = 1;
43 if (swiotlb) {
44 printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n");
45 swiotlb_init();
46 dma_ops = &swiotlb_dma_ops;
47 }
48 #else
49 swiotlb_init();
50 if (swiotlb) {
51 printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n");
52 dma_ops = &swiotlb_dma_ops;
53 }
54 #endif
55 }