diff options
Diffstat (limited to 'arch/ia64/hp')
-rw-r--r-- | arch/ia64/hp/common/sba_iommu.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index e82870a76801..29e7206f3dc6 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -909,7 +909,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) | |||
909 | * | 909 | * |
910 | * See Documentation/DMA-mapping.txt | 910 | * See Documentation/DMA-mapping.txt |
911 | */ | 911 | */ |
912 | dma_addr_t | 912 | static dma_addr_t |
913 | sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir, | 913 | sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir, |
914 | struct dma_attrs *attrs) | 914 | struct dma_attrs *attrs) |
915 | { | 915 | { |
@@ -991,7 +991,6 @@ sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir, | |||
991 | #endif | 991 | #endif |
992 | return SBA_IOVA(ioc, iovp, offset); | 992 | return SBA_IOVA(ioc, iovp, offset); |
993 | } | 993 | } |
994 | EXPORT_SYMBOL(sba_map_single_attrs); | ||
995 | 994 | ||
996 | #ifdef ENABLE_MARK_CLEAN | 995 | #ifdef ENABLE_MARK_CLEAN |
997 | static SBA_INLINE void | 996 | static SBA_INLINE void |
@@ -1027,8 +1026,8 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size) | |||
1027 | * | 1026 | * |
1028 | * See Documentation/DMA-mapping.txt | 1027 | * See Documentation/DMA-mapping.txt |
1029 | */ | 1028 | */ |
1030 | void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size, | 1029 | static void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size, |
1031 | int dir, struct dma_attrs *attrs) | 1030 | int dir, struct dma_attrs *attrs) |
1032 | { | 1031 | { |
1033 | struct ioc *ioc; | 1032 | struct ioc *ioc; |
1034 | #if DELAYED_RESOURCE_CNT > 0 | 1033 | #if DELAYED_RESOURCE_CNT > 0 |
@@ -1095,7 +1094,6 @@ void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size, | |||
1095 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 1094 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1096 | #endif /* DELAYED_RESOURCE_CNT == 0 */ | 1095 | #endif /* DELAYED_RESOURCE_CNT == 0 */ |
1097 | } | 1096 | } |
1098 | EXPORT_SYMBOL(sba_unmap_single_attrs); | ||
1099 | 1097 | ||
1100 | /** | 1098 | /** |
1101 | * sba_alloc_coherent - allocate/map shared mem for DMA | 1099 | * sba_alloc_coherent - allocate/map shared mem for DMA |
@@ -1105,7 +1103,7 @@ EXPORT_SYMBOL(sba_unmap_single_attrs); | |||
1105 | * | 1103 | * |
1106 | * See Documentation/DMA-mapping.txt | 1104 | * See Documentation/DMA-mapping.txt |
1107 | */ | 1105 | */ |
1108 | void * | 1106 | static void * |
1109 | sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags) | 1107 | sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags) |
1110 | { | 1108 | { |
1111 | struct ioc *ioc; | 1109 | struct ioc *ioc; |
@@ -1168,7 +1166,8 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp | |||
1168 | * | 1166 | * |
1169 | * See Documentation/DMA-mapping.txt | 1167 | * See Documentation/DMA-mapping.txt |
1170 | */ | 1168 | */ |
1171 | void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle) | 1169 | static void sba_free_coherent (struct device *dev, size_t size, void *vaddr, |
1170 | dma_addr_t dma_handle) | ||
1172 | { | 1171 | { |
1173 | sba_unmap_single_attrs(dev, dma_handle, size, 0, NULL); | 1172 | sba_unmap_single_attrs(dev, dma_handle, size, 0, NULL); |
1174 | free_pages((unsigned long) vaddr, get_order(size)); | 1173 | free_pages((unsigned long) vaddr, get_order(size)); |
@@ -1423,8 +1422,8 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, | |||
1423 | * | 1422 | * |
1424 | * See Documentation/DMA-mapping.txt | 1423 | * See Documentation/DMA-mapping.txt |
1425 | */ | 1424 | */ |
1426 | int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, | 1425 | static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, |
1427 | int dir, struct dma_attrs *attrs) | 1426 | int nents, int dir, struct dma_attrs *attrs) |
1428 | { | 1427 | { |
1429 | struct ioc *ioc; | 1428 | struct ioc *ioc; |
1430 | int coalesced, filled = 0; | 1429 | int coalesced, filled = 0; |
@@ -1503,7 +1502,6 @@ int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents, | |||
1503 | 1502 | ||
1504 | return filled; | 1503 | return filled; |
1505 | } | 1504 | } |
1506 | EXPORT_SYMBOL(sba_map_sg_attrs); | ||
1507 | 1505 | ||
1508 | /** | 1506 | /** |
1509 | * sba_unmap_sg_attrs - unmap Scatter/Gather list | 1507 | * sba_unmap_sg_attrs - unmap Scatter/Gather list |
@@ -1515,8 +1513,8 @@ EXPORT_SYMBOL(sba_map_sg_attrs); | |||
1515 | * | 1513 | * |
1516 | * See Documentation/DMA-mapping.txt | 1514 | * See Documentation/DMA-mapping.txt |
1517 | */ | 1515 | */ |
1518 | void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, | 1516 | static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, |
1519 | int nents, int dir, struct dma_attrs *attrs) | 1517 | int nents, int dir, struct dma_attrs *attrs) |
1520 | { | 1518 | { |
1521 | #ifdef ASSERT_PDIR_SANITY | 1519 | #ifdef ASSERT_PDIR_SANITY |
1522 | struct ioc *ioc; | 1520 | struct ioc *ioc; |
@@ -1552,7 +1550,6 @@ void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, | |||
1552 | #endif | 1550 | #endif |
1553 | 1551 | ||
1554 | } | 1552 | } |
1555 | EXPORT_SYMBOL(sba_unmap_sg_attrs); | ||
1556 | 1553 | ||
1557 | /************************************************************** | 1554 | /************************************************************** |
1558 | * | 1555 | * |
@@ -2143,15 +2140,13 @@ nosbagart(char *str) | |||
2143 | return 1; | 2140 | return 1; |
2144 | } | 2141 | } |
2145 | 2142 | ||
2146 | int | 2143 | static int sba_dma_supported (struct device *dev, u64 mask) |
2147 | sba_dma_supported (struct device *dev, u64 mask) | ||
2148 | { | 2144 | { |
2149 | /* make sure it's at least 32bit capable */ | 2145 | /* make sure it's at least 32bit capable */ |
2150 | return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL); | 2146 | return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL); |
2151 | } | 2147 | } |
2152 | 2148 | ||
2153 | int | 2149 | static int sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
2154 | sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
2155 | { | 2150 | { |
2156 | return 0; | 2151 | return 0; |
2157 | } | 2152 | } |
@@ -2181,11 +2176,6 @@ sba_page_override(char *str) | |||
2181 | 2176 | ||
2182 | __setup("sbapagesize=",sba_page_override); | 2177 | __setup("sbapagesize=",sba_page_override); |
2183 | 2178 | ||
2184 | EXPORT_SYMBOL(sba_dma_mapping_error); | ||
2185 | EXPORT_SYMBOL(sba_dma_supported); | ||
2186 | EXPORT_SYMBOL(sba_alloc_coherent); | ||
2187 | EXPORT_SYMBOL(sba_free_coherent); | ||
2188 | |||
2189 | struct dma_mapping_ops sba_dma_ops = { | 2179 | struct dma_mapping_ops sba_dma_ops = { |
2190 | .alloc_coherent = sba_alloc_coherent, | 2180 | .alloc_coherent = sba_alloc_coherent, |
2191 | .free_coherent = sba_free_coherent, | 2181 | .free_coherent = sba_free_coherent, |