diff options
Diffstat (limited to 'Documentation/DMA-mapping.txt')
-rw-r--r-- | Documentation/DMA-mapping.txt | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index e07f2530326b..d84f89dbf921 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt | |||
@@ -189,12 +189,6 @@ smaller mask as pci_set_dma_mask(). However for the rare case that a | |||
189 | device driver only uses consistent allocations, one would have to | 189 | device driver only uses consistent allocations, one would have to |
190 | check the return value from pci_set_consistent_dma_mask(). | 190 | check the return value from pci_set_consistent_dma_mask(). |
191 | 191 | ||
192 | If your 64-bit device is going to be an enormous consumer of DMA | ||
193 | mappings, this can be problematic since the DMA mappings are a | ||
194 | finite resource on many platforms. Please see the "DAC Addressing | ||
195 | for Address Space Hungry Devices" section near the end of this | ||
196 | document for how to handle this case. | ||
197 | |||
198 | Finally, if your device can only drive the low 24-bits of | 192 | Finally, if your device can only drive the low 24-bits of |
199 | address during PCI bus mastering you might do something like: | 193 | address during PCI bus mastering you might do something like: |
200 | 194 | ||
@@ -203,8 +197,6 @@ address during PCI bus mastering you might do something like: | |||
203 | "mydev: 24-bit DMA addressing not available.\n"); | 197 | "mydev: 24-bit DMA addressing not available.\n"); |
204 | goto ignore_this_device; | 198 | goto ignore_this_device; |
205 | } | 199 | } |
206 | [Better use DMA_24BIT_MASK instead of 0x00ffffff. | ||
207 | See linux/include/dma-mapping.h for reference.] | ||
208 | 200 | ||
209 | When pci_set_dma_mask() is successful, and returns zero, the PCI layer | 201 | When pci_set_dma_mask() is successful, and returns zero, the PCI layer |
210 | saves away this mask you have provided. The PCI layer will use this | 202 | saves away this mask you have provided. The PCI layer will use this |
@@ -514,7 +506,7 @@ With scatterlists, you map a region gathered from several regions by: | |||
514 | int i, count = pci_map_sg(dev, sglist, nents, direction); | 506 | int i, count = pci_map_sg(dev, sglist, nents, direction); |
515 | struct scatterlist *sg; | 507 | struct scatterlist *sg; |
516 | 508 | ||
517 | for (i = 0, sg = sglist; i < count; i++, sg++) { | 509 | for_each_sg(sglist, sg, count, i) { |
518 | hw_address[i] = sg_dma_address(sg); | 510 | hw_address[i] = sg_dma_address(sg); |
519 | hw_len[i] = sg_dma_len(sg); | 511 | hw_len[i] = sg_dma_len(sg); |
520 | } | 512 | } |
@@ -652,18 +644,6 @@ It is planned to completely remove virt_to_bus() and bus_to_virt() as | |||
652 | they are entirely deprecated. Some ports already do not provide these | 644 | they are entirely deprecated. Some ports already do not provide these |
653 | as it is impossible to correctly support them. | 645 | as it is impossible to correctly support them. |
654 | 646 | ||
655 | 64-bit DMA and DAC cycle support | ||
656 | |||
657 | Do you understand all of the text above? Great, then you already | ||
658 | know how to use 64-bit DMA addressing under Linux. Simply make | ||
659 | the appropriate pci_set_dma_mask() calls based upon your cards | ||
660 | capabilities, then use the mapping APIs above. | ||
661 | |||
662 | It is that simple. | ||
663 | |||
664 | Well, not for some odd devices. See the next section for information | ||
665 | about that. | ||
666 | |||
667 | Optimizing Unmap State Space Consumption | 647 | Optimizing Unmap State Space Consumption |
668 | 648 | ||
669 | On many platforms, pci_unmap_{single,page}() is simply a nop. | 649 | On many platforms, pci_unmap_{single,page}() is simply a nop. |
@@ -782,5 +762,5 @@ following people: | |||
782 | Jay Estabrook <Jay.Estabrook@compaq.com> | 762 | Jay Estabrook <Jay.Estabrook@compaq.com> |
783 | Thomas Sailer <sailer@ife.ee.ethz.ch> | 763 | Thomas Sailer <sailer@ife.ee.ethz.ch> |
784 | Andrea Arcangeli <andrea@suse.de> | 764 | Andrea Arcangeli <andrea@suse.de> |
785 | Jens Axboe <axboe@suse.de> | 765 | Jens Axboe <jens.axboe@oracle.com> |
786 | David Mosberger-Tang <davidm@hpl.hp.com> | 766 | David Mosberger-Tang <davidm@hpl.hp.com> |