summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrishna Reddy <vdumpa@nvidia.com>2012-01-10 16:33:33 -0800
committerVarun Colbert <vcolbert@nvidia.com>2012-01-19 16:15:08 -0800
commit593286fff9e08c417817c3cf4bfc0716fe89a93e (patch)
treeb38cff0f858ec2926caf831b11dd9b0fb8428b05 /include
parentfe5e1690d6d2e0625e8a4ed8d3953ac304c893de (diff)
lib: genalloc: Add API to allocate at specified addr.
Add API to allocate at specified alloc address. Change-Id: I188e5430220c050026c6a3e17a586012d9a9fa04 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/74468 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/genalloc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
index 5e98eeb2af3b..32034bceedaf 100644
--- a/include/linux/genalloc.h
+++ b/include/linux/genalloc.h
@@ -72,7 +72,17 @@ static inline int gen_pool_add(struct gen_pool *pool, unsigned long addr,
return gen_pool_add_virt(pool, addr, -1, size, nid);
}
extern void gen_pool_destroy(struct gen_pool *);
-extern unsigned long gen_pool_alloc(struct gen_pool *, size_t);
+extern unsigned long gen_pool_alloc_addr(struct gen_pool *,
+ size_t, unsigned long);
+/**
+ * gen_pool_alloc - allocate special memory from the pool
+ * @pool: pool to allocate from
+ * @size: number of bytes to allocate from the pool
+ */
+static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
+{
+ return gen_pool_alloc_addr(pool, size);
+}
extern void gen_pool_free(struct gen_pool *, unsigned long, size_t);
extern void gen_pool_for_each_chunk(struct gen_pool *,
void (*)(struct gen_pool *, struct gen_pool_chunk *, void *), void *);