diff options
Diffstat (limited to 'arch/alpha/kernel/pci_iommu.c')
-rw-r--r-- | arch/alpha/kernel/pci_iommu.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index c468e312e5f8..6e7d1fe6e935 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -300,6 +300,7 @@ pci_map_single(struct pci_dev *pdev, void *cpu_addr, size_t size, int dir) | |||
300 | dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; | 300 | dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; |
301 | return pci_map_single_1(pdev, cpu_addr, size, dac_allowed); | 301 | return pci_map_single_1(pdev, cpu_addr, size, dac_allowed); |
302 | } | 302 | } |
303 | EXPORT_SYMBOL(pci_map_single); | ||
303 | 304 | ||
304 | dma_addr_t | 305 | dma_addr_t |
305 | pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, | 306 | pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, |
@@ -314,6 +315,7 @@ pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, | |||
314 | return pci_map_single_1(pdev, (char *)page_address(page) + offset, | 315 | return pci_map_single_1(pdev, (char *)page_address(page) + offset, |
315 | size, dac_allowed); | 316 | size, dac_allowed); |
316 | } | 317 | } |
318 | EXPORT_SYMBOL(pci_map_page); | ||
317 | 319 | ||
318 | /* Unmap a single streaming mode DMA translation. The DMA_ADDR and | 320 | /* Unmap a single streaming mode DMA translation. The DMA_ADDR and |
319 | SIZE must match what was provided for in a previous pci_map_single | 321 | SIZE must match what was provided for in a previous pci_map_single |
@@ -379,6 +381,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size, | |||
379 | DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n", | 381 | DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n", |
380 | dma_addr, size, npages, __builtin_return_address(0)); | 382 | dma_addr, size, npages, __builtin_return_address(0)); |
381 | } | 383 | } |
384 | EXPORT_SYMBOL(pci_unmap_single); | ||
382 | 385 | ||
383 | void | 386 | void |
384 | pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, | 387 | pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, |
@@ -386,6 +389,7 @@ pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, | |||
386 | { | 389 | { |
387 | pci_unmap_single(pdev, dma_addr, size, direction); | 390 | pci_unmap_single(pdev, dma_addr, size, direction); |
388 | } | 391 | } |
392 | EXPORT_SYMBOL(pci_unmap_page); | ||
389 | 393 | ||
390 | /* Allocate and map kernel buffer using consistent mode DMA for PCI | 394 | /* Allocate and map kernel buffer using consistent mode DMA for PCI |
391 | device. Returns non-NULL cpu-view pointer to the buffer if | 395 | device. Returns non-NULL cpu-view pointer to the buffer if |
@@ -427,6 +431,7 @@ try_again: | |||
427 | 431 | ||
428 | return cpu_addr; | 432 | return cpu_addr; |
429 | } | 433 | } |
434 | EXPORT_SYMBOL(pci_alloc_consistent); | ||
430 | 435 | ||
431 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must | 436 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must |
432 | be values that were returned from pci_alloc_consistent. SIZE must | 437 | be values that were returned from pci_alloc_consistent. SIZE must |
@@ -444,7 +449,7 @@ pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu_addr, | |||
444 | DBGA2("pci_free_consistent: [%x,%lx] from %p\n", | 449 | DBGA2("pci_free_consistent: [%x,%lx] from %p\n", |
445 | dma_addr, size, __builtin_return_address(0)); | 450 | dma_addr, size, __builtin_return_address(0)); |
446 | } | 451 | } |
447 | 452 | EXPORT_SYMBOL(pci_free_consistent); | |
448 | 453 | ||
449 | /* Classify the elements of the scatterlist. Write dma_address | 454 | /* Classify the elements of the scatterlist. Write dma_address |
450 | of each element with: | 455 | of each element with: |
@@ -672,6 +677,7 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents, | |||
672 | pci_unmap_sg(pdev, start, out - start, direction); | 677 | pci_unmap_sg(pdev, start, out - start, direction); |
673 | return 0; | 678 | return 0; |
674 | } | 679 | } |
680 | EXPORT_SYMBOL(pci_map_sg); | ||
675 | 681 | ||
676 | /* Unmap a set of streaming mode DMA translations. Again, cpu read | 682 | /* Unmap a set of streaming mode DMA translations. Again, cpu read |
677 | rules concerning calls here are the same as for pci_unmap_single() | 683 | rules concerning calls here are the same as for pci_unmap_single() |
@@ -752,6 +758,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents, | |||
752 | 758 | ||
753 | DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg)); | 759 | DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg)); |
754 | } | 760 | } |
761 | EXPORT_SYMBOL(pci_unmap_sg); | ||
755 | 762 | ||
756 | 763 | ||
757 | /* Return whether the given PCI device DMA address mask can be | 764 | /* Return whether the given PCI device DMA address mask can be |
@@ -786,6 +793,7 @@ pci_dma_supported(struct pci_dev *pdev, u64 mask) | |||
786 | 793 | ||
787 | return 0; | 794 | return 0; |
788 | } | 795 | } |
796 | EXPORT_SYMBOL(pci_dma_supported); | ||
789 | 797 | ||
790 | 798 | ||
791 | /* | 799 | /* |
@@ -908,6 +916,7 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask) | |||
908 | 916 | ||
909 | return ok; | 917 | return ok; |
910 | } | 918 | } |
919 | EXPORT_SYMBOL(pci_dac_dma_supported); | ||
911 | 920 | ||
912 | dma64_addr_t | 921 | dma64_addr_t |
913 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, | 922 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, |
@@ -917,6 +926,7 @@ pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, | |||
917 | + __pa(page_address(page)) | 926 | + __pa(page_address(page)) |
918 | + (dma64_addr_t) offset); | 927 | + (dma64_addr_t) offset); |
919 | } | 928 | } |
929 | EXPORT_SYMBOL(pci_dac_page_to_dma); | ||
920 | 930 | ||
921 | struct page * | 931 | struct page * |
922 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | 932 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) |
@@ -924,13 +934,14 @@ pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | |||
924 | unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; | 934 | unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; |
925 | return virt_to_page(__va(paddr)); | 935 | return virt_to_page(__va(paddr)); |
926 | } | 936 | } |
937 | EXPORT_SYMBOL(pci_dac_dma_to_page); | ||
927 | 938 | ||
928 | unsigned long | 939 | unsigned long |
929 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | 940 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) |
930 | { | 941 | { |
931 | return (dma_addr & ~PAGE_MASK); | 942 | return (dma_addr & ~PAGE_MASK); |
932 | } | 943 | } |
933 | 944 | EXPORT_SYMBOL(pci_dac_dma_to_offset); | |
934 | 945 | ||
935 | /* Helper for generic DMA-mapping functions. */ | 946 | /* Helper for generic DMA-mapping functions. */ |
936 | 947 | ||
@@ -957,6 +968,7 @@ alpha_gendev_to_pci(struct device *dev) | |||
957 | /* This assumes ISA bus master with dma_mask 0xffffff. */ | 968 | /* This assumes ISA bus master with dma_mask 0xffffff. */ |
958 | return NULL; | 969 | return NULL; |
959 | } | 970 | } |
971 | EXPORT_SYMBOL(alpha_gendev_to_pci); | ||
960 | 972 | ||
961 | int | 973 | int |
962 | dma_set_mask(struct device *dev, u64 mask) | 974 | dma_set_mask(struct device *dev, u64 mask) |
@@ -969,3 +981,4 @@ dma_set_mask(struct device *dev, u64 mask) | |||
969 | 981 | ||
970 | return 0; | 982 | return 0; |
971 | } | 983 | } |
984 | EXPORT_SYMBOL(dma_set_mask); | ||