diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-05-20 18:56:27 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-05-26 19:28:27 -0400 |
commit | f311a724a79669ac0336932d0361325afdb54279 (patch) | |
tree | 1f86a93a676d25961f692ca5966ea1decb0a867f | |
parent | ace4b3fd67e771951d495aa1f1b1000984083362 (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>
-rw-r--r-- | Documentation/DMA-API-HOWTO.txt | 8 | ||||
-rw-r--r-- | Documentation/DMA-API.txt | 12 |
2 files changed, 10 insertions, 10 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: | |||
575 | You should call dma_unmap_single() when the DMA activity is finished, e.g., | 575 | You should call dma_unmap_single() when the DMA activity is finished, e.g., |
576 | from the interrupt which told you that the DMA transfer is done. | 576 | from the interrupt which told you that the DMA transfer is done. |
577 | 577 | ||
578 | Using cpu pointers like this for single mappings has a disadvantage: | 578 | Using CPU pointers like this for single mappings has a disadvantage: |
579 | you cannot reference HIGHMEM memory in this way. Thus, there is a | 579 | you cannot reference HIGHMEM memory in this way. Thus, there is a |
580 | map/unmap interface pair akin to dma_{map,unmap}_single(). These | 580 | map/unmap interface pair akin to dma_{map,unmap}_single(). These |
581 | interfaces deal with page/offset pairs instead of cpu pointers. | 581 | interfaces deal with page/offset pairs instead of CPU pointers. |
582 | Specifically: | 582 | Specifically: |
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 | ||
651 | If you need to use the same streaming DMA region multiple times and touch | 651 | If you need to use the same streaming DMA region multiple times and touch |
652 | the data in between the DMA transfers, the buffer needs to be synced | 652 | the data in between the DMA transfers, the buffer needs to be synced |
653 | properly in order for the cpu and device to see the most up-to-date and | 653 | properly in order for the CPU and device to see the most up-to-date and |
654 | correct copy of the DMA buffer. | 654 | correct copy of the DMA buffer. |
655 | 655 | ||
656 | So, firstly, just map it with dma_map_{single,sg}(), and after each DMA | 656 | So, firstly, just map it with dma_map_{single,sg}(), and after each DMA |
@@ -665,7 +665,7 @@ or: | |||
665 | as appropriate. | 665 | as appropriate. |
666 | 666 | ||
667 | Then, if you wish to let the device get at the DMA area again, | 667 | Then, if you wish to let the device get at the DMA area again, |
668 | finish accessing the data with the cpu, and then before actually | 668 | finish accessing the data with the CPU, and then before actually |
669 | giving the buffer to the hardware call either: | 669 | giving 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); |
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 4f1cdc5febd1..52088408668a 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -19,7 +19,7 @@ To get the dma_ API, you must #include <linux/dma-mapping.h>. This | |||
19 | provides dma_addr_t and the interfaces described below. | 19 | provides dma_addr_t and the interfaces described below. |
20 | 20 | ||
21 | A dma_addr_t can hold any valid DMA or bus address for the platform. It | 21 | A dma_addr_t can hold any valid DMA or bus address for the platform. It |
22 | can be given to a device to use as a DMA source or target. A cpu cannot | 22 | can be given to a device to use as a DMA source or target. A CPU cannot |
23 | reference a dma_addr_t directly because there may be translation between | 23 | reference a dma_addr_t directly because there may be translation between |
24 | its physical address space and the bus address space. | 24 | its physical address space and the bus address space. |
25 | 25 | ||
@@ -112,7 +112,7 @@ size and alignment requirements specified at creation time. Pass | |||
112 | GFP_ATOMIC to prevent blocking, or if it's permitted (not | 112 | GFP_ATOMIC to prevent blocking, or if it's permitted (not |
113 | in_interrupt, not holding SMP locks), pass GFP_KERNEL to allow | 113 | in_interrupt, not holding SMP locks), pass GFP_KERNEL to allow |
114 | blocking. Like dma_alloc_coherent(), this returns two values: an | 114 | blocking. Like dma_alloc_coherent(), this returns two values: an |
115 | address usable by the cpu, and the DMA address usable by the pool's | 115 | address usable by the CPU, and the DMA address usable by the pool's |
116 | device. | 116 | device. |
117 | 117 | ||
118 | 118 | ||
@@ -120,7 +120,7 @@ device. | |||
120 | dma_addr_t addr); | 120 | dma_addr_t addr); |
121 | 121 | ||
122 | This puts memory back into the pool. The pool is what was passed to | 122 | This puts memory back into the pool. The pool is what was passed to |
123 | dma_pool_alloc(); the cpu (vaddr) and DMA addresses are what | 123 | dma_pool_alloc(); the CPU (vaddr) and DMA addresses are what |
124 | were returned when that routine allocated the memory being freed. | 124 | were returned when that routine allocated the memory being freed. |
125 | 125 | ||
126 | 126 | ||
@@ -355,7 +355,7 @@ void | |||
355 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | 355 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, |
356 | enum dma_data_direction direction) | 356 | enum dma_data_direction direction) |
357 | 357 | ||
358 | Synchronise a single contiguous or scatter/gather mapping for the cpu | 358 | Synchronise a single contiguous or scatter/gather mapping for the CPU |
359 | and device. With the sync_sg API, all the parameters must be the same | 359 | and device. With the sync_sg API, all the parameters must be the same |
360 | as those passed into the single mapping API. With the sync_single API, | 360 | as those passed into the single mapping API. With the sync_single API, |
361 | you can use dma_handle and size parameters that aren't identical to | 361 | you can use dma_handle and size parameters that aren't identical to |
@@ -504,8 +504,8 @@ dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, | |||
504 | Declare region of memory to be handed out by dma_alloc_coherent() when | 504 | Declare region of memory to be handed out by dma_alloc_coherent() when |
505 | it's asked for coherent memory for this device. | 505 | it's asked for coherent memory for this device. |
506 | 506 | ||
507 | phys_addr is the cpu physical address to which the memory is currently | 507 | phys_addr is the CPU physical address to which the memory is currently |
508 | assigned (this will be ioremapped so the cpu can access the region). | 508 | assigned (this will be ioremapped so the CPU can access the region). |
509 | 509 | ||
510 | device_addr is the bus address the device needs to be programmed | 510 | device_addr is the bus address the device needs to be programmed |
511 | with to actually address this memory (this will be handed out as the | 511 | with to actually address this memory (this will be handed out as the |