pci-dma.c (c82e4417ace9a3a4dddf3332379c771c41040040) | pci-dma.c (4d9b977ca674dd40cfc1409a75cb73fca2cee423) |
---|---|
1/* 2 * Dynamic DMA mapping support. 3 */ 4 5#include <linux/types.h> 6#include <linux/mm.h> 7#include <linux/string.h> 8#include <linux/pci.h> --- 27 unchanged lines hidden (view full) --- 36 be probably a smaller DMA mask, but this is bug-to-bug compatible 37 to i386. */ 38struct device fallback_dev = { 39 .bus_id = "fallback device", 40 .coherent_dma_mask = DMA_32BIT_MASK, 41 .dma_mask = &fallback_dev.coherent_dma_mask, 42}; 43 | 1/* 2 * Dynamic DMA mapping support. 3 */ 4 5#include <linux/types.h> 6#include <linux/mm.h> 7#include <linux/string.h> 8#include <linux/pci.h> --- 27 unchanged lines hidden (view full) --- 36 be probably a smaller DMA mask, but this is bug-to-bug compatible 37 to i386. */ 38struct device fallback_dev = { 39 .bus_id = "fallback device", 40 .coherent_dma_mask = DMA_32BIT_MASK, 41 .dma_mask = &fallback_dev.coherent_dma_mask, 42}; 43 |
44extern struct dma_mapping_ops vtd_dma_ops; 45 |
|
44void __init pci_iommu_alloc(void) 45{ | 46void __init pci_iommu_alloc(void) 47{ |
48 dma_ops = &vtd_dma_ops; |
|
46 /* 47 * The order of these functions is important for 48 * fall-back/fail-over reasons 49 */ 50 detect_intel_iommu(); 51 52#ifdef CONFIG_SWIOTLB 53 pci_swiotlb_init(); --- 17 unchanged lines hidden (view full) --- 71} 72 73void __init 74iommu_dma_init(void) 75{ 76 return; 77} 78 | 49 /* 50 * The order of these functions is important for 51 * fall-back/fail-over reasons 52 */ 53 detect_intel_iommu(); 54 55#ifdef CONFIG_SWIOTLB 56 pci_swiotlb_init(); --- 17 unchanged lines hidden (view full) --- 74} 75 76void __init 77iommu_dma_init(void) 78{ 79 return; 80} 81 |
79struct dma_mapping_ops *dma_ops; 80EXPORT_SYMBOL(dma_ops); 81 | |
82int iommu_dma_supported(struct device *dev, u64 mask) 83{ 84 struct dma_mapping_ops *ops = get_dma_ops(dev); 85 86 if (ops->dma_supported_op) 87 return ops->dma_supported_op(dev, mask); 88 89 /* Copied from i386. Doesn't make much sense, because it will --- 27 unchanged lines hidden --- | 82int iommu_dma_supported(struct device *dev, u64 mask) 83{ 84 struct dma_mapping_ops *ops = get_dma_ops(dev); 85 86 if (ops->dma_supported_op) 87 return ops->dma_supported_op(dev, mask); 88 89 /* Copied from i386. Doesn't make much sense, because it will --- 27 unchanged lines hidden --- |