On Thu, Jun 24, 2010 at 6:10 PM, Kanigeri, Hari <[email protected]> wrote:
> Ohad,
>
>> mbox_configured is global and therefore does not support
>> concurrent usage of multiple mailbox instances.
>
> -- Why do you say that it doesn't support concurrent usage of multiple 
> mailbox instances ? If you take example of OMAP4, we have 2 mailbox 
> instances, one talking to DSP and other to Ducati and they should be 
> supported concurrently.


Interesting. was this actually tested and found working ?

AFAICT (I don't have OMAP4, this is just by looking at the code) this
doesn't work:
mbox_configured will prevent omap2_mbox_startup from being invoked
more than once. This means that omap2_mbox_enable_irq(mbox, IRQ_RX)
will only be called once too, which seems like a problem if you want
to start receiving RX interrupts from both mbox instances at the same
time.

To fix that I guess we should decouple the RX interrupt enabling from
the mbox startup function. I can write something, but I'd need your
help to test it on OMAP4 :)

>
> If you remove the mbox_configured variable, then the mailbox module would 
> shut down
> once the first instance calls the omap_mbox_put function.

Also interesting point.

So you use mbox_configures as a reference counter to allow concurrent
multiple senders to the same mbox instance.

I will update the previous patch (that introduced the atomic_t
reference counter) to reflect this use case, thanks!

>
> Thank you,
> Best regards,
> Hari
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to