mailbox: bcm-flexrm-mailbox: Use bitmap instead of IDA
authorAnup Patel <anup.patel@broadcom.com>
Tue, 1 Aug 2017 10:35:53 +0000 (16:05 +0530)
committerJassi Brar <jaswinder.singh@linaro.org>
Thu, 31 Aug 2017 03:09:03 +0000 (08:39 +0530)
commit1f7466c6b428fa52504e85c2df43aa8641f9294e
treec88a077d8702a59bede6083da96d059522badb22
parent6d2061b981af165d3e45462e0804b5a1f2f4c7bc
mailbox: bcm-flexrm-mailbox: Use bitmap instead of IDA

Currently, we are using IDA library for managing IDs
on a FlexRM ring. The IDA library dynamically allocates
memory for underlying data structures which can cause
potential locking issue when allocating/free IDs from
flexrm_new_request() and flexrm_process_completions().

To tackle this, we replace use of IDA with bitmap for
each FlexRM ring and also protect the bitmap with FlexRM
ring lock.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/bcm-flexrm-mailbox.c