diff options
author | Zhao Qiang <qiang.zhao@freescale.com> | 2015-11-30 05:48:53 +0300 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-12-23 02:10:17 +0300 |
commit | b26981c8f743d3cb64a6907eb1f5c6c4ba6ca672 (patch) | |
tree | 60c2eb0964020d0ffe5fbe51f68d9bc03d89655c /include/linux/genalloc.h | |
parent | de2dd0eb30af55d3893979d5641c50c7a8969c99 (diff) | |
download | linux-b26981c8f743d3cb64a6907eb1f5c6c4ba6ca672.tar.xz |
genalloc:support allocating specific region
Add new algo for genalloc, it reserve a specific region of
memory
Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'include/linux/genalloc.h')
-rw-r--r-- | include/linux/genalloc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index 3c676ce46ee0..29d4385903d4 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h @@ -84,6 +84,13 @@ struct genpool_data_align { int align; /* alignment by bytes for starting address */ }; +/* + * gen_pool data descriptor for gen_pool_fixed_alloc. + */ +struct genpool_data_fixed { + unsigned long offset; /* The offset of the specific region */ +}; + extern struct gen_pool *gen_pool_create(int, int); extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long); extern int gen_pool_add_virt(struct gen_pool *, unsigned long, phys_addr_t, @@ -124,6 +131,10 @@ extern unsigned long gen_pool_first_fit(unsigned long *map, unsigned long size, unsigned long start, unsigned int nr, void *data, struct gen_pool *pool); +extern unsigned long gen_pool_fixed_alloc(unsigned long *map, + unsigned long size, unsigned long start, unsigned int nr, + void *data, struct gen_pool *pool); + extern unsigned long gen_pool_first_fit_align(unsigned long *map, unsigned long size, unsigned long start, unsigned int nr, void *data, struct gen_pool *pool); |