summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2010-08-17 12:29:32 -0500
committerRicardo Perez Olivares <x0081762@ti.com>2010-08-17 14:03:07 -0500
commit36eaa1e8086d229c8918de935283521192ff8765 (patch)
tree5b435002aaf68d452a7a386b63e86b4c6dd27497 /drivers
parentb447a28eadce761148f91c22c795087a9a657a3e (diff)
SYSLINK: ipc - track the heapbufmp allocations
The heapbufmp allocations are currently not tracked, and so any call to getExtendedStats returns the wrong values. This patch enables the tracking, and also fixes a minor bug with tracking in the heapbufmp_alloc call. The bug is modifying the statistics in alloc not based on the tracking flag. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dsp/syslink/multicore_ipc/heapbufmp.c29
-rw-r--r--drivers/dsp/syslink/multicore_ipc/platform.c1
2 files changed, 16 insertions, 14 deletions
diff --git a/drivers/dsp/syslink/multicore_ipc/heapbufmp.c b/drivers/dsp/syslink/multicore_ipc/heapbufmp.c
index 6f3b5608ba56..798545e7ffd5 100644
--- a/drivers/dsp/syslink/multicore_ipc/heapbufmp.c
+++ b/drivers/dsp/syslink/multicore_ipc/heapbufmp.c
@@ -978,24 +978,25 @@ void *heapbufmp_alloc(void *hphandle, u32 size, u32 align)
true);
}
#endif
- }
- obj->attrs->num_free_blocks--;
+ obj->attrs->num_free_blocks--;
- if (obj->attrs->num_free_blocks
- < obj->attrs->min_free_blocks) {
- /* save the new minimum */
- obj->attrs->min_free_blocks = obj->attrs->num_free_blocks;
- }
+ if (obj->attrs->num_free_blocks
+ < obj->attrs->min_free_blocks) {
+ /* save the new minimum */
+ obj->attrs->min_free_blocks =
+ obj->attrs->num_free_blocks;
+ }
#if 0
- /* Make sure the attrs are written out to memory */
- if (EXPECT_false(obj->cacheEnabled == true)) {
- Cache_wbInv((Ptr) obj->attrs,
- sizeof(heapbufmp_attrs),
- Cache_Type_ALL,
- true);
- }
+ /* Make sure the attrs are written out to memory */
+ if (EXPECT_false(obj->cacheEnabled == true)) {
+ Cache_wbInv((Ptr) obj->attrs,
+ sizeof(heapbufmp_attrs),
+ Cache_Type_ALL,
+ true);
+ }
#endif
+ }
gatemp_leave(obj->gate, key);
if (block == NULL)
diff --git a/drivers/dsp/syslink/multicore_ipc/platform.c b/drivers/dsp/syslink/multicore_ipc/platform.c
index 8b8ab817c262..88aa78fa8908 100644
--- a/drivers/dsp/syslink/multicore_ipc/platform.c
+++ b/drivers/dsp/syslink/multicore_ipc/platform.c
@@ -686,6 +686,7 @@ platform_override_config(struct platform_config *config)
/* Override the PROCMGR default config */
/* Override the HeapBuf default config */
+ config->heapbufmp_config.track_allocs = true;
/* Override the LISTMPSHAREDMEMORY default config */