diff options
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/Kconfig | 3 | ||||
-rw-r--r-- | arch/alpha/kernel/pci_iommu.c | 32 |
2 files changed, 8 insertions, 27 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 79c6e5a24456..2a85dc33907c 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -327,6 +327,9 @@ config PCI_DOMAINS | |||
327 | bool | 327 | bool |
328 | default y | 328 | default y |
329 | 329 | ||
330 | config PCI_SYSCALL | ||
331 | def_bool PCI | ||
332 | |||
330 | config ALPHA_CORE_AGP | 333 | config ALPHA_CORE_AGP |
331 | bool | 334 | bool |
332 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL | 335 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL |
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index 28c84e55feb9..6b07f89a72c7 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -207,6 +207,10 @@ iommu_arena_free(struct pci_iommu_arena *arena, long ofs, long n) | |||
207 | p[i] = 0; | 207 | p[i] = 0; |
208 | } | 208 | } |
209 | 209 | ||
210 | /* True if the machine supports DAC addressing, and DEV can | ||
211 | make use of it given MASK. */ | ||
212 | static int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask); | ||
213 | |||
210 | /* Map a single buffer of the indicated size for PCI DMA in streaming | 214 | /* Map a single buffer of the indicated size for PCI DMA in streaming |
211 | mode. The 32-bit PCI bus mastering address to use is returned. | 215 | mode. The 32-bit PCI bus mastering address to use is returned. |
212 | Once the device is given the dma address, the device owns this memory | 216 | Once the device is given the dma address, the device owns this memory |
@@ -897,7 +901,7 @@ iommu_unbind(struct pci_iommu_arena *arena, long pg_start, long pg_count) | |||
897 | /* True if the machine supports DAC addressing, and DEV can | 901 | /* True if the machine supports DAC addressing, and DEV can |
898 | make use of it given MASK. */ | 902 | make use of it given MASK. */ |
899 | 903 | ||
900 | int | 904 | static int |
901 | pci_dac_dma_supported(struct pci_dev *dev, u64 mask) | 905 | pci_dac_dma_supported(struct pci_dev *dev, u64 mask) |
902 | { | 906 | { |
903 | dma64_addr_t dac_offset = alpha_mv.pci_dac_offset; | 907 | dma64_addr_t dac_offset = alpha_mv.pci_dac_offset; |
@@ -917,32 +921,6 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask) | |||
917 | 921 | ||
918 | return ok; | 922 | return ok; |
919 | } | 923 | } |
920 | EXPORT_SYMBOL(pci_dac_dma_supported); | ||
921 | |||
922 | dma64_addr_t | ||
923 | pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, | ||
924 | unsigned long offset, int direction) | ||
925 | { | ||
926 | return (alpha_mv.pci_dac_offset | ||
927 | + __pa(page_address(page)) | ||
928 | + (dma64_addr_t) offset); | ||
929 | } | ||
930 | EXPORT_SYMBOL(pci_dac_page_to_dma); | ||
931 | |||
932 | struct page * | ||
933 | pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
934 | { | ||
935 | unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; | ||
936 | return virt_to_page(__va(paddr)); | ||
937 | } | ||
938 | EXPORT_SYMBOL(pci_dac_dma_to_page); | ||
939 | |||
940 | unsigned long | ||
941 | pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) | ||
942 | { | ||
943 | return (dma_addr & ~PAGE_MASK); | ||
944 | } | ||
945 | EXPORT_SYMBOL(pci_dac_dma_to_offset); | ||
946 | 924 | ||
947 | /* Helper for generic DMA-mapping functions. */ | 925 | /* Helper for generic DMA-mapping functions. */ |
948 | 926 | ||