diff options
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r-- | arch/powerpc/lib/rheap.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c index ada5b42dd231..22c3b4f53de7 100644 --- a/arch/powerpc/lib/rheap.c +++ b/arch/powerpc/lib/rheap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | ||
18 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
@@ -275,6 +276,7 @@ rh_info_t *rh_create(unsigned int alignment) | |||
275 | 276 | ||
276 | return info; | 277 | return info; |
277 | } | 278 | } |
279 | EXPORT_SYMBOL_GPL(rh_create); | ||
278 | 280 | ||
279 | /* | 281 | /* |
280 | * Destroy a dynamically created remote heap. Deallocate only if the areas | 282 | * Destroy a dynamically created remote heap. Deallocate only if the areas |
@@ -288,6 +290,7 @@ void rh_destroy(rh_info_t * info) | |||
288 | if ((info->flags & RHIF_STATIC_INFO) == 0) | 290 | if ((info->flags & RHIF_STATIC_INFO) == 0) |
289 | kfree(info); | 291 | kfree(info); |
290 | } | 292 | } |
293 | EXPORT_SYMBOL_GPL(rh_destroy); | ||
291 | 294 | ||
292 | /* | 295 | /* |
293 | * Initialize in place a remote heap info block. This is needed to support | 296 | * 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 | for (i = 0, blk = block; i < max_blocks; i++, blk++) | 323 | for (i = 0, blk = block; i < max_blocks; i++, blk++) |
321 | list_add(&blk->list, &info->empty_list); | 324 | list_add(&blk->list, &info->empty_list); |
322 | } | 325 | } |
326 | EXPORT_SYMBOL_GPL(rh_init); | ||
323 | 327 | ||
324 | /* Attach a free memory region, coalesces regions if adjuscent */ | 328 | /* Attach a free memory region, coalesces regions if adjuscent */ |
325 | int rh_attach_region(rh_info_t * info, unsigned long start, int size) | 329 | 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 | 364 | ||
361 | return 0; | 365 | return 0; |
362 | } | 366 | } |
367 | EXPORT_SYMBOL_GPL(rh_attach_region); | ||
363 | 368 | ||
364 | /* Detatch given address range, splits free block if needed. */ | 369 | /* Detatch given address range, splits free block if needed. */ |
365 | unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) | 370 | 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 | 433 | ||
429 | return s; | 434 | return s; |
430 | } | 435 | } |
436 | EXPORT_SYMBOL_GPL(rh_detach_region); | ||
431 | 437 | ||
432 | /* Allocate a block of memory at the specified alignment. The value returned | 438 | /* Allocate a block of memory at the specified alignment. The value returned |
433 | * is an offset into the buffer initialized by rh_init(), or a negative number | 439 | * 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 | 508 | ||
503 | return start; | 509 | return start; |
504 | } | 510 | } |
511 | EXPORT_SYMBOL_GPL(rh_alloc_align); | ||
505 | 512 | ||
506 | /* Allocate a block of memory at the default alignment. The value returned is | 513 | /* Allocate a block of memory at the default alignment. The value returned is |
507 | * an offset into the buffer initialized by rh_init(), or a negative number if | 514 | * 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 | { | 518 | { |
512 | return rh_alloc_align(info, size, info->alignment, owner); | 519 | return rh_alloc_align(info, size, info->alignment, owner); |
513 | } | 520 | } |
521 | EXPORT_SYMBOL_GPL(rh_alloc); | ||
514 | 522 | ||
515 | /* Allocate a block of memory at the given offset, rounded up to the default | 523 | /* Allocate a block of memory at the given offset, rounded up to the default |
516 | * alignment. The value returned is an offset into the buffer initialized by | 524 | * 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 | 602 | ||
595 | return start; | 603 | return start; |
596 | } | 604 | } |
605 | EXPORT_SYMBOL_GPL(rh_alloc_fixed); | ||
597 | 606 | ||
598 | /* Deallocate the memory previously allocated by one of the rh_alloc functions. | 607 | /* Deallocate the memory previously allocated by one of the rh_alloc functions. |
599 | * The return value is the size of the deallocated block, or a negative number | 608 | * 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 | 635 | ||
627 | return size; | 636 | return size; |
628 | } | 637 | } |
638 | EXPORT_SYMBOL_GPL(rh_free); | ||
629 | 639 | ||
630 | int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) | 640 | int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) |
631 | { | 641 | { |
@@ -663,6 +673,7 @@ int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) | |||
663 | 673 | ||
664 | return nr; | 674 | return nr; |
665 | } | 675 | } |
676 | EXPORT_SYMBOL_GPL(rh_get_stats); | ||
666 | 677 | ||
667 | int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) | 678 | int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) |
668 | { | 679 | { |
@@ -687,6 +698,7 @@ int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) | |||
687 | 698 | ||
688 | return size; | 699 | return size; |
689 | } | 700 | } |
701 | EXPORT_SYMBOL_GPL(rh_set_owner); | ||
690 | 702 | ||
691 | void rh_dump(rh_info_t * info) | 703 | void rh_dump(rh_info_t * info) |
692 | { | 704 | { |
@@ -722,6 +734,7 @@ void rh_dump(rh_info_t * info) | |||
722 | st[i].size, st[i].owner != NULL ? st[i].owner : ""); | 734 | st[i].size, st[i].owner != NULL ? st[i].owner : ""); |
723 | printk(KERN_INFO "\n"); | 735 | printk(KERN_INFO "\n"); |
724 | } | 736 | } |
737 | EXPORT_SYMBOL_GPL(rh_dump); | ||
725 | 738 | ||
726 | void rh_dump_blk(rh_info_t * info, rh_block_t * blk) | 739 | void rh_dump_blk(rh_info_t * info, rh_block_t * blk) |
727 | { | 740 | { |
@@ -729,3 +742,5 @@ void rh_dump_blk(rh_info_t * info, rh_block_t * blk) | |||
729 | "blk @0x%p: 0x%lx-0x%lx (%u)\n", | 742 | "blk @0x%p: 0x%lx-0x%lx (%u)\n", |
730 | blk, blk->start, blk->start + blk->size, blk->size); | 743 | blk, blk->start, blk->start + blk->size, blk->size); |
731 | } | 744 | } |
745 | EXPORT_SYMBOL_GPL(rh_dump_blk); | ||
746 | |||