diff options
-rw-r--r-- | drivers/pci/pci.c | 28 | ||||
-rw-r--r-- | include/asm-generic/pci-dma-compat.h | 15 | ||||
-rw-r--r-- | include/linux/pci.h | 2 |
3 files changed, 12 insertions, 33 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 929fd393203..cb1dd5f4988 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -2298,32 +2298,6 @@ void pci_msi_off(struct pci_dev *dev) | |||
2298 | } | 2298 | } |
2299 | } | 2299 | } |
2300 | 2300 | ||
2301 | #ifndef HAVE_ARCH_PCI_SET_DMA_MASK | ||
2302 | /* | ||
2303 | * These can be overridden by arch-specific implementations | ||
2304 | */ | ||
2305 | int | ||
2306 | pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
2307 | { | ||
2308 | int ret = dma_set_mask(&dev->dev, mask); | ||
2309 | if (ret) | ||
2310 | return ret; | ||
2311 | dev_dbg(&dev->dev, "using %dbit DMA mask\n", fls64(mask)); | ||
2312 | return 0; | ||
2313 | } | ||
2314 | |||
2315 | int | ||
2316 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
2317 | { | ||
2318 | int ret = dma_set_coherent_mask(&dev->dev, mask); | ||
2319 | if (ret) | ||
2320 | return ret; | ||
2321 | |||
2322 | dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask)); | ||
2323 | return 0; | ||
2324 | } | ||
2325 | #endif | ||
2326 | |||
2327 | #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE | 2301 | #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE |
2328 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) | 2302 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) |
2329 | { | 2303 | { |
@@ -3065,8 +3039,6 @@ EXPORT_SYMBOL(pci_set_mwi); | |||
3065 | EXPORT_SYMBOL(pci_try_set_mwi); | 3039 | EXPORT_SYMBOL(pci_try_set_mwi); |
3066 | EXPORT_SYMBOL(pci_clear_mwi); | 3040 | EXPORT_SYMBOL(pci_clear_mwi); |
3067 | EXPORT_SYMBOL_GPL(pci_intx); | 3041 | EXPORT_SYMBOL_GPL(pci_intx); |
3068 | EXPORT_SYMBOL(pci_set_dma_mask); | ||
3069 | EXPORT_SYMBOL(pci_set_consistent_dma_mask); | ||
3070 | EXPORT_SYMBOL(pci_assign_resource); | 3042 | EXPORT_SYMBOL(pci_assign_resource); |
3071 | EXPORT_SYMBOL(pci_find_parent_resource); | 3043 | EXPORT_SYMBOL(pci_find_parent_resource); |
3072 | EXPORT_SYMBOL(pci_select_bars); | 3044 | EXPORT_SYMBOL(pci_select_bars); |
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 37b3706226e..1437b7da09b 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
@@ -6,9 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
8 | 8 | ||
9 | /* note pci_set_dma_mask isn't here, since it's a public function | ||
10 | * exported from drivers/pci, use dma_supported instead */ | ||
11 | |||
12 | static inline int | 9 | static inline int |
13 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) | 10 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) |
14 | { | 11 | { |
@@ -104,4 +101,16 @@ pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr) | |||
104 | return dma_mapping_error(&pdev->dev, dma_addr); | 101 | return dma_mapping_error(&pdev->dev, dma_addr); |
105 | } | 102 | } |
106 | 103 | ||
104 | #ifdef CONFIG_PCI | ||
105 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
106 | { | ||
107 | return dma_set_mask(&dev->dev, mask); | ||
108 | } | ||
109 | |||
110 | static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
111 | { | ||
112 | return dma_set_coherent_mask(&dev->dev, mask); | ||
113 | } | ||
114 | #endif | ||
115 | |||
107 | #endif | 116 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7fd5c574efa..a788fa12ff3 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -769,8 +769,6 @@ int pci_try_set_mwi(struct pci_dev *dev); | |||
769 | void pci_clear_mwi(struct pci_dev *dev); | 769 | void pci_clear_mwi(struct pci_dev *dev); |
770 | void pci_intx(struct pci_dev *dev, int enable); | 770 | void pci_intx(struct pci_dev *dev, int enable); |
771 | void pci_msi_off(struct pci_dev *dev); | 771 | void pci_msi_off(struct pci_dev *dev); |
772 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | ||
773 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | ||
774 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); | 772 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); |
775 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); | 773 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); |
776 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 774 | int pcix_get_max_mmrbc(struct pci_dev *dev); |