Commit 6a4438ee authored by C A Subramaniam's avatar C A Subramaniam Committed by Hari Kanigeri

SYSLINK IPC Patch to accomodate the use of multiple heaps

This patch adds support to use multiple ipc heaps.
Signed-off-by: default avatarC A Subramaniam <subramaniam.ca@ti.com>
parent 4aac0a8d
......@@ -345,6 +345,7 @@ int messageq_setup(const struct messageq_config *cfg)
goto nameserver_create_fail;
}
messageq_state.num_heaps = cfg->num_heaps;
messageq_state.heaps = kzalloc(sizeof(void *) * \
messageq_state.num_heaps, GFP_KERNEL);
if (messageq_state.heaps == NULL) {
......
......@@ -62,11 +62,11 @@
/* SYSM3 Heap */
#define SYSM3HEAPID 0
#define SYSM3HEAPNAME "myHeap" /*FIXME "SYSM3Heap" */
#define SYSM3HEAPNAME "SysMgrHeap0"
/* APPM3 Heap */
#define APPM3HEAPID 0 /*FIXME 1 */
#define APPM3HEAPNAME "myHeap" /*FIXME "APPM3Heap" */
#define APPM3HEAPID 1
#define APPM3HEAPNAME "SysMgrHeap1"
/*!
......@@ -1270,10 +1270,8 @@ void platform_stop_callback(void *arg)
if (pc_params.use_heapbuf) {
if (index == SMHEAP_SRINDEX_APPM3)
status = messageq_unregister_heap(APPM3HEAPID);
/* FIXME HEAPID?? */
else
status = messageq_unregister_heap(SYSM3HEAPID);
/* FIXME HEAPID?? */
if (status < 0) {
printk(KERN_ERR "platform_stop_callback : "
"messageq_unregister_heap failed [0x%x]",
......
......@@ -63,6 +63,9 @@ int platform_override_config(struct sysmgr_config *config)
/* Override the listmp default config */
/* Override the messageq default config */
/* We use 2 heaps, 1 for APPM3 and 1 for SYSM3 */
if (config->messageq_cfg.num_heaps < 2)
config->messageq_cfg.num_heaps = 2;
/* Override the notify default config */
config->notify_cfg.maxDrivers = 2;
......
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