Skip to contentSkip to conversation

Documentation/DMA-API-HOWTO.txt: update API descriptions

PATCH Applied gioh.kim 2 participants 3 messages May 12, 2014 – May 20, 2014 Documentation

lore
Share & tools
lore

gioh.kim

author
#0 lore raw

PATCH 1/1 Documentation/DMA-API-HOWTO.txt: update API descriptions

From: "gioh.kim" <[email protected]>

update descriptions for dma_pool_create and dma_pool_alloc

---
 Documentation/DMA-API-HOWTO.txt |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/DMA-API-HOWTO.txt +4 -4
index 5e98303..e4251a3 100644
@@ -373,13 +373,13 @@ Create a dma_pool like this:
 
 	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
 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
 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
 go for dma_alloc_coherent directly instead).
 
@@ -387,8 +387,8 @@ Allocate memory from a dma pool like this:
 
 	cpu_addr = dma_pool_alloc(pool, flags, &dma_handle);
 
-flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor
-holding SMP locks), SLAB_ATOMIC otherwise.  Like dma_alloc_coherent,
+flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor
+holding SMP locks), GFP_ATOMIC otherwise.  Like dma_alloc_coherent,
 this returns two values, cpu_addr and dma_handle.
 
 Free memory that was allocated from a dma_pool like this:
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 5 lines · gioh.kim

From: "gioh.kim" <[email protected]>

update descriptions for dma_pool_create and dma_pool_alloc

I applied this to my "dma-api" branch for v3.16, thanks!

(I fixed up the From: line as you did for the other patch.)

Quoted 43 lines
---
 Documentation/DMA-API-HOWTO.txt |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/DMA-API-HOWTO.txt +4 -4
index 5e98303..e4251a3 100644
@@ -373,13 +373,13 @@ Create a dma_pool like this:
 
 	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
 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
 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
 go for dma_alloc_coherent directly instead).
 
@@ -387,8 +387,8 @@ Allocate memory from a dma pool like this:
 
 	cpu_addr = dma_pool_alloc(pool, flags, &dma_handle);
 
-flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor
-holding SMP locks), SLAB_ATOMIC otherwise.  Like dma_alloc_coherent,
+flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor
+holding SMP locks), GFP_ATOMIC otherwise.  Like dma_alloc_coherent,
 this returns two values, cpu_addr and dma_handle.
 
 Free memory that was allocated from a dma_pool like this:
Signature · 7 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
author
#2 lore raw

I'm glad that my patch is useful.
Thank you.

2014-05-21 오전 8:19, Bjorn Helgaas 쓴 글:

Quoted 55 lines · gioh.kim
Quoted 5 lines

From: "gioh.kim" <[email protected]>

update descriptions for dma_pool_create and dma_pool_alloc

I applied this to my "dma-api" branch for v3.16, thanks!

(I fixed up the From: line as you did for the other patch.)

Quoted 43 lines
---
  Documentation/DMA-API-HOWTO.txt |    8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/DMA-API-HOWTO.txt +4 -5
index 5e98303..e4251a3 100644
@@ -373,13 +373,13 @@ Create a dma_pool like this:
 
  	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
  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
  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
  go for dma_alloc_coherent directly instead).
 
@@ -387,8 +387,8 @@ Allocate memory from a dma pool like this:
 
  	cpu_addr = dma_pool_alloc(pool, flags, &dma_handle);
 
-flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor
-holding SMP locks), SLAB_ATOMIC otherwise.  Like dma_alloc_coherent,
+flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor
+holding SMP locks), GFP_ATOMIC otherwise.  Like dma_alloc_coherent,
  this returns two values, cpu_addr and dma_handle.
 
  Free memory that was allocated from a dma_pool like this:
--

1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/