From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <53DB8A36.9040405@arm.com> Date: Fri, 01 Aug 2014 13:38:14 +0100 From: Sudeep Holla MIME-Version: 1.0 Subject: Re: [PATCHv9 2/4] mailbox: Introduce framework for mailbox References: <1406055250-29159-1-git-send-email-jaswinder.singh@linaro.org> <1406055374-29275-1-git-send-email-jaswinder.singh@linaro.org> <53DA7DBD.10704@arm.com> <53DB6035.8080002@arm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable To: Jassi Brar Cc: Sudeep Holla , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ks.giri@samsung.com" , "arnd@arndb.de" , "ijc@hellion.org.uk" , Mark Rutland , "robh@kernel.org" , Pawel Moll , "courtney.cavin@sonymobile.com" , "mporter@linaro.org" , "slapdau@yahoo.com.au" , "lftan.linux@gmail.com" , "loic.pallardy@st.com" , "s-anna@ti.com" , "ashwin.chaugule@linaro.org" , "bjorn@kryo.se" , "patches@linaro.org" , "t.takinishi@jp.fujitsu.com" , "broonie@linaro.org" , "khilman@linaro.org" , "mollie.wu@linaro.org" , "andy.green@linaro.org" , "lee.jones@linaro.org" List-ID: On 01/08/14 13:28, Jassi Brar wrote: > On 1 August 2014 15:09, Sudeep Holla wrote: >> On 31/07/14 18:58, Jassi Brar wrote: > >>>> >>>> Probably this is discussed already, but again I missed to find it >>>> in archives, so asking here. If the protocol has some payload associat= ed >>>> with the message and controller expects it to be in place before calli= ng >>>> send_data, we essentially end up not using this queue at all by waitin= g >>>> in the protocol layer(may be in it's own queue) >>>> >>> Why essentially? >>> The 'data' is a void * i.o.w the packet format is a completely >>> internal understanding between a controller and a client. The 'data' >>> can point to a copy of payload that the controller driver sets up in >>> the shared payload region as the first thing in send_data() callback. >>> OR, like my 'server' type platform, where the access is serialized to >>> the shared payload region. >>> >> >> Yes that's exactly what I have now. But based on your driver I thought >> that the shared memory should not be associated with the mailbox control= ler >> and should be completely handled in the protocol/client. >> >> Also to handle async packet from remote, controller has to pass shared >> memory pointer always to the client to read the data as the buffer won't >> to ready in such case. So I thought it's good idea to handle shared memo= ry >> completely in client/protocol. >> > Again ur platform has the freedom. The async client should have a free > packet to copy the data as soon as it arrives. > My platform divides the SHM into two parts - one for each direction. > I understand that, but I wanted to know what's the general recommendation for mailbox controller drivers. Do they need to be associated with the shared memory or is it left the protocol ? The main reason I am asking is that the MHU driver you had didn't deal with any shared memory. That's fine and if we want to make that common/generic we need to know if we are going to handle shared memory in there or leave it to client/protocol implementations. Regards. Sudeep