RE: [PATCH 3/4] omap mailbox: remove mbox_configured scheme

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-omap-owner@xxxxxxxxxxxxxxx 
> [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of C.A, 
> Subramaniam
> Sent: Thursday, June 24, 2010 4:36 PM
> To: Ohad Ben-Cohen; Kanigeri, Hari
> Cc: linux-omap@xxxxxxxxxxxxxxx; Hiroshi Doyu; Ramirez Luna, Omar
> Subject: RE: [PATCH 3/4] omap mailbox: remove mbox_configured scheme
> 
> 
> > -----Original Message-----
> > From: linux-omap-owner@xxxxxxxxxxxxxxx 
> > [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of Ohad 
> Ben-Cohen
> > Sent: Thursday, June 24, 2010 3:23 PM
> > To: Kanigeri, Hari
> > Cc: linux-omap@xxxxxxxxxxxxxxx; Hiroshi Doyu; Ramirez Luna, Omar
> > Subject: Re: [PATCH 3/4] omap mailbox: remove mbox_configured scheme
> > 
> > On Thu, Jun 24, 2010 at 6:10 PM, Kanigeri, Hari 
> <h-kanigeri2@xxxxxx> 
> > 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 ?
> > 
> I think by supporting multiple instances, what Hari meant was 
> that, for DSP and Ducati 2 different struct omap_mbox * are 
> returned. They still can maintain their own callback function
> (http://dev.omapzoom.org/?p=tisyslink/kernel-syslink.git;a=blo
> b;f=arch/arm/mach-omap2/mailbox.c;h=a23c7edf1e84ab4fa51e56d0c2
> daf2922084751a;hb=438f7a6a3cced478eb121426201206f6205fbbdc#l32
> 7 for Ducati and
> 
> http://dev.omapzoom.org/?p=tisyslink/kernel-syslink.git;a=blob
> ;f=arch/arm/mach-omap2/mailbox.c;h=a23c7edf1e84ab4fa51e56d0c2d
> af2922084751a;hb=438f7a6a3cced478eb121426201206f6205fbbdc#l334
> for DSP).
> 
> The "mbox_configured" was a means to reference count for one 
> instance of the struct omap_mbox * .
Sorry I that that back. Even though we maintain 2 strucutres, only the one that calls the request_irq() is honoured. Hence yes only one callback will be serviced (Thank to Ramesh for pointing that out). Chaining of callbacks is a good way to allow multiple clients to be notified.

>   
> > 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 majordomo@xxxxxxxxxxxxxxx More 
> majordomo 
> > info at http://vger.kernel.org/majordomo-info.html
> > 
> 
> 
> Thank you and Regards
> Subbu--
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in the body of a message to 
> majordomo@xxxxxxxxxxxxxxx More majordomo info at  
> http://vger.kernel.org/majordomo-info.html
> 

Thank you and Regards
Subbu--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux