aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
commit21ba0f88ae56da82a3a15fe54d729208b64c4f4b (patch)
tree17ce67f276fe3ea7284c3dc730bdd6a2ec7dfe2f /arch/alpha/kernel
parentdc690d8ef842b464f1c429a376ca16cb8dbee6ae (diff)
parent36e235901f90fb83215be43cbd8f1ca14661ea40 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/pci_iommu.c32
1 files changed, 5 insertions, 27 deletions
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. */
212static 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
900int 904static int
901pci_dac_dma_supported(struct pci_dev *dev, u64 mask) 905pci_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}
920EXPORT_SYMBOL(pci_dac_dma_supported);
921
922dma64_addr_t
923pci_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}
930EXPORT_SYMBOL(pci_dac_page_to_dma);
931
932struct page *
933pci_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}
938EXPORT_SYMBOL(pci_dac_dma_to_page);
939
940unsigned long
941pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr)
942{
943 return (dma_addr & ~PAGE_MASK);
944}
945EXPORT_SYMBOL(pci_dac_dma_to_offset);
946 924
947/* Helper for generic DMA-mapping functions. */ 925/* Helper for generic DMA-mapping functions. */
948 926