Commit d4697af4 authored by Sylvain Munaut's avatar Sylvain Munaut Committed by Grant Likely

[POWERPC] exports rheap symbol to modules

Theses can be useful in modules too. So we export them.
Signed-off-by: default avatarSylvain Munaut <tnt@246tNt.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 65a6ec0d
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -275,6 +276,7 @@ rh_info_t *rh_create(unsigned int alignment) ...@@ -275,6 +276,7 @@ rh_info_t *rh_create(unsigned int alignment)
return info; return info;
} }
EXPORT_SYMBOL_GPL(rh_create);
/* /*
* Destroy a dynamically created remote heap. Deallocate only if the areas * Destroy a dynamically created remote heap. Deallocate only if the areas
...@@ -288,6 +290,7 @@ void rh_destroy(rh_info_t * info) ...@@ -288,6 +290,7 @@ void rh_destroy(rh_info_t * info)
if ((info->flags & RHIF_STATIC_INFO) == 0) if ((info->flags & RHIF_STATIC_INFO) == 0)
kfree(info); kfree(info);
} }
EXPORT_SYMBOL_GPL(rh_destroy);
/* /*
* Initialize in place a remote heap info block. This is needed to support * Initialize in place a remote heap info block. This is needed to support
...@@ -320,6 +323,7 @@ void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks, ...@@ -320,6 +323,7 @@ void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks,
for (i = 0, blk = block; i < max_blocks; i++, blk++) for (i = 0, blk = block; i < max_blocks; i++, blk++)
list_add(&blk->list, &info->empty_list); list_add(&blk->list, &info->empty_list);
} }
EXPORT_SYMBOL_GPL(rh_init);
/* Attach a free memory region, coalesces regions if adjuscent */ /* Attach a free memory region, coalesces regions if adjuscent */
int rh_attach_region(rh_info_t * info, unsigned long start, int size) int rh_attach_region(rh_info_t * info, unsigned long start, int size)
...@@ -360,6 +364,7 @@ int rh_attach_region(rh_info_t * info, unsigned long start, int size) ...@@ -360,6 +364,7 @@ int rh_attach_region(rh_info_t * info, unsigned long start, int size)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(rh_attach_region);
/* Detatch given address range, splits free block if needed. */ /* Detatch given address range, splits free block if needed. */
unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size)
...@@ -428,6 +433,7 @@ unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) ...@@ -428,6 +433,7 @@ unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size)
return s; return s;
} }
EXPORT_SYMBOL_GPL(rh_detach_region);
/* Allocate a block of memory at the specified alignment. The value returned /* Allocate a block of memory at the specified alignment. The value returned
* is an offset into the buffer initialized by rh_init(), or a negative number * is an offset into the buffer initialized by rh_init(), or a negative number
...@@ -502,6 +508,7 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch ...@@ -502,6 +508,7 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch
return start; return start;
} }
EXPORT_SYMBOL_GPL(rh_alloc_align);
/* Allocate a block of memory at the default alignment. The value returned is /* Allocate a block of memory at the default alignment. The value returned is
* an offset into the buffer initialized by rh_init(), or a negative number if * an offset into the buffer initialized by rh_init(), or a negative number if
...@@ -511,6 +518,7 @@ unsigned long rh_alloc(rh_info_t * info, int size, const char *owner) ...@@ -511,6 +518,7 @@ unsigned long rh_alloc(rh_info_t * info, int size, const char *owner)
{ {
return rh_alloc_align(info, size, info->alignment, owner); return rh_alloc_align(info, size, info->alignment, owner);
} }
EXPORT_SYMBOL_GPL(rh_alloc);
/* Allocate a block of memory at the given offset, rounded up to the default /* Allocate a block of memory at the given offset, rounded up to the default
* alignment. The value returned is an offset into the buffer initialized by * alignment. The value returned is an offset into the buffer initialized by
...@@ -594,6 +602,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co ...@@ -594,6 +602,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co
return start; return start;
} }
EXPORT_SYMBOL_GPL(rh_alloc_fixed);
/* Deallocate the memory previously allocated by one of the rh_alloc functions. /* Deallocate the memory previously allocated by one of the rh_alloc functions.
* The return value is the size of the deallocated block, or a negative number * The return value is the size of the deallocated block, or a negative number
...@@ -626,6 +635,7 @@ int rh_free(rh_info_t * info, unsigned long start) ...@@ -626,6 +635,7 @@ int rh_free(rh_info_t * info, unsigned long start)
return size; return size;
} }
EXPORT_SYMBOL_GPL(rh_free);
int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats)
{ {
...@@ -663,6 +673,7 @@ int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) ...@@ -663,6 +673,7 @@ int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats)
return nr; return nr;
} }
EXPORT_SYMBOL_GPL(rh_get_stats);
int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner)
{ {
...@@ -687,6 +698,7 @@ int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) ...@@ -687,6 +698,7 @@ int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner)
return size; return size;
} }
EXPORT_SYMBOL_GPL(rh_set_owner);
void rh_dump(rh_info_t * info) void rh_dump(rh_info_t * info)
{ {
...@@ -722,6 +734,7 @@ void rh_dump(rh_info_t * info) ...@@ -722,6 +734,7 @@ void rh_dump(rh_info_t * info)
st[i].size, st[i].owner != NULL ? st[i].owner : ""); st[i].size, st[i].owner != NULL ? st[i].owner : "");
printk(KERN_INFO "\n"); printk(KERN_INFO "\n");
} }
EXPORT_SYMBOL_GPL(rh_dump);
void rh_dump_blk(rh_info_t * info, rh_block_t * blk) void rh_dump_blk(rh_info_t * info, rh_block_t * blk)
{ {
...@@ -729,3 +742,5 @@ void rh_dump_blk(rh_info_t * info, rh_block_t * blk) ...@@ -729,3 +742,5 @@ void rh_dump_blk(rh_info_t * info, rh_block_t * blk)
"blk @0x%p: 0x%lx-0x%lx (%u)\n", "blk @0x%p: 0x%lx-0x%lx (%u)\n",
blk, blk->start, blk->start + blk->size, blk->size); blk, blk->start, blk->start + blk->size, blk->size);
} }
EXPORT_SYMBOL_GPL(rh_dump_blk);
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