aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DMA-API-HOWTO.txt
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-05-20 18:56:27 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-05-26 19:28:27 -0400
commitf311a724a79669ac0336932d0361325afdb54279 (patch)
tree1f86a93a676d25961f692ca5966ea1decb0a867f /Documentation/DMA-API-HOWTO.txt
parentace4b3fd67e771951d495aa1f1b1000984083362 (diff)
DMA-API: Capitalize "CPU" consistently
Sometimes we used "cpu," other times "CPU." Use "CPU" consistently. Suggested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'Documentation/DMA-API-HOWTO.txt')
-rw-r--r--Documentation/DMA-API-HOWTO.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index fd3727b94ac2..f59955303475 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -575,10 +575,10 @@ Incorrect example 2:
575You should call dma_unmap_single() when the DMA activity is finished, e.g., 575You should call dma_unmap_single() when the DMA activity is finished, e.g.,
576from the interrupt which told you that the DMA transfer is done. 576from the interrupt which told you that the DMA transfer is done.
577 577
578Using cpu pointers like this for single mappings has a disadvantage: 578Using CPU pointers like this for single mappings has a disadvantage:
579you cannot reference HIGHMEM memory in this way. Thus, there is a 579you cannot reference HIGHMEM memory in this way. Thus, there is a
580map/unmap interface pair akin to dma_{map,unmap}_single(). These 580map/unmap interface pair akin to dma_{map,unmap}_single(). These
581interfaces deal with page/offset pairs instead of cpu pointers. 581interfaces deal with page/offset pairs instead of CPU pointers.
582Specifically: 582Specifically:
583 583
584 struct device *dev = &my_dev->dev; 584 struct device *dev = &my_dev->dev;
@@ -650,7 +650,7 @@ you could render the machine unusable by consuming all bus addresses.
650 650
651If you need to use the same streaming DMA region multiple times and touch 651If you need to use the same streaming DMA region multiple times and touch
652the data in between the DMA transfers, the buffer needs to be synced 652the data in between the DMA transfers, the buffer needs to be synced
653properly in order for the cpu and device to see the most up-to-date and 653properly in order for the CPU and device to see the most up-to-date and
654correct copy of the DMA buffer. 654correct copy of the DMA buffer.
655 655
656So, firstly, just map it with dma_map_{single,sg}(), and after each DMA 656So, firstly, just map it with dma_map_{single,sg}(), and after each DMA
@@ -665,7 +665,7 @@ or:
665as appropriate. 665as appropriate.
666 666
667Then, if you wish to let the device get at the DMA area again, 667Then, if you wish to let the device get at the DMA area again,
668finish accessing the data with the cpu, and then before actually 668finish accessing the data with the CPU, and then before actually
669giving the buffer to the hardware call either: 669giving the buffer to the hardware call either:
670 670
671 dma_sync_single_for_device(dev, dma_handle, size, direction); 671 dma_sync_single_for_device(dev, dma_handle, size, direction);