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.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
diff --git a/arch/arm/mach-msm/memory.c b/arch/arm/mach-msm/memory.c
index 2d01795..dc146b3 100644
--- a/arch/arm/mach-msm/memory.c
+++ b/arch/arm/mach-msm/memory.c
@@ -361,7 +361,8 @@
 unsigned long allocate_contiguous_ebi_nomap(unsigned long size,
 	unsigned long align)
 {
-	return allocate_contiguous_memory_nomap(size, get_ebi_memtype(), align);
+	return _allocate_contiguous_memory_nomap(size, get_ebi_memtype(),
+		align, __builtin_return_address(0));
 }
 EXPORT_SYMBOL(allocate_contiguous_ebi_nomap);
 
@@ -402,10 +403,12 @@
 		return -EINVAL;
 	}
 
-	paddr = allocate_contiguous_memory_nomap(size, memtype, align);
+	paddr = _allocate_contiguous_memory_nomap(size, memtype, align,
+		__builtin_return_address(0));
+
 	if (!paddr && pmem_memtype == PMEM_MEMTYPE_SMI)
-		paddr = allocate_contiguous_memory_nomap(size,
-			ebi1_memtype, align);
+		paddr = _allocate_contiguous_memory_nomap(size,
+			ebi1_memtype, align, __builtin_return_address(0));
 
 	if (!paddr)
 		return -ENOMEM;