Commit 2af9da86 authored by Gioh Kim's avatar Gioh Kim Committed by Bjorn Helgaas

DMA-API: Update dma_pool_create ()and dma_pool_alloc() descriptions

Use "boundary" to be more descriptive than "alloc" in the dma_pool_create()
documentation.

Replace "SLAB_KERNEL" and "SLAB_ATOMIC" with the correct "GFP_KERNEL" and
"GFP_ATOMIC."

[bhelgaas: changelog]
Signed-off-by: default avatarGioh Kim <gioh.kim@lge.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 34c815fb
...@@ -429,13 +429,13 @@ Create a dma_pool like this: ...@@ -429,13 +429,13 @@ Create a dma_pool like this:
struct dma_pool *pool; struct dma_pool *pool;
pool = dma_pool_create(name, dev, size, align, alloc); pool = dma_pool_create(name, dev, size, align, boundary);
The "name" is for diagnostics (like a kmem_cache name); dev and size The "name" is for diagnostics (like a kmem_cache name); dev and size
are as above. The device's hardware alignment requirement for this are as above. The device's hardware alignment requirement for this
type of data is "align" (which is expressed in bytes, and must be a type of data is "align" (which is expressed in bytes, and must be a
power of two). If your device has no boundary crossing restrictions, power of two). If your device has no boundary crossing restrictions,
pass 0 for alloc; passing 4096 says memory allocated from this pool pass 0 for boundary; passing 4096 says memory allocated from this pool
must not cross 4KByte boundaries (but at that time it may be better to must not cross 4KByte boundaries (but at that time it may be better to
use dma_alloc_coherent() directly instead). use dma_alloc_coherent() directly instead).
...@@ -443,8 +443,8 @@ Allocate memory from a DMA pool like this: ...@@ -443,8 +443,8 @@ Allocate memory from a DMA pool like this:
cpu_addr = dma_pool_alloc(pool, flags, &dma_handle); cpu_addr = dma_pool_alloc(pool, flags, &dma_handle);
flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor
holding SMP locks), SLAB_ATOMIC otherwise. Like dma_alloc_coherent(), holding SMP locks), GFP_ATOMIC otherwise. Like dma_alloc_coherent(),
this returns two values, cpu_addr and dma_handle. this returns two values, cpu_addr and dma_handle.
Free memory that was allocated from a dma_pool like this: Free memory that was allocated from a dma_pool like this:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment