5 Commits

Author SHA1 Message Date
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Jordan Crouse
4e752a1de0 lib: Add debugfs file for tracking memory allocations
Add caller information to memory allocation calls and
create /sys/kernel/debug/mempool/map to show the current set of
allocations across all memory pools.

Change-Id: I0f3613158595a3a12837c46dfe500e2e3fea57b9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit 9081938c99b91c714316d6fa3a6618ab27789dc7)

Conflicts:

	arch/arm/mach-msm/memory.c
2013-02-20 01:32:24 -08:00
Jordan Crouse
ad6baf2b9e lib: Remove negative error values from allocate_contiguous_memory_nomap
allocate_contiguous_memory_nomap returns an unsigned long yet it
was returning errno codes for various failures.  Replace all negative
errno codes with 0, which is what all the callers expect on error anyway.

Change-Id: I3f847f70e0d7fa947a3442f43a980b3ffb1bfd96
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit f319151ecf9bdb51295ddbf6ac8385f63fd4ae70)
2013-02-20 01:32:23 -08:00
Larry Bassel
05019c4010 lib: remove extraneous exports and function prototypes
Remove the function prototype for the function
alloc_from_memory_pool() (this function was never implemented).
The function mem_type_to_memory_pool() was not intended to be
exported, so remove the export and function prototypes.

Change-Id: Iac47d5c8a8aaf21554c2a7a56f42d6f7de689d3e
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit fe7d2ee21af00476fe9e578fcfea1c34a70bd30f)
2013-02-20 01:32:23 -08:00
Larry Bassel
d9483c7058 lib: memory alloc
Add a generic library (which uses genalloc) that manages
pools of contiguous memory.

APIs are provided to allocate (and if desired map) and free
memory, as well to initialize a memory pool.

Change-Id: I75deda08eb852a323b4d1a32c3b7980e7aa143a8
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
(cherry picked from commit 54bff5255ff4adf204d2b4a9805cdb998167fb9e)
2013-02-20 01:32:22 -08:00