[PATCH v4 09/14] mailbox: Add Gunyah message queue mailbox

Jassi Brar jassisinghbrar at gmail.com
Thu Sep 29 10:37:12 PDT 2022


On Thu, Sep 29, 2022 at 11:59 AM Bjorn Andersson <andersson at kernel.org> wrote:
>
> On Wed, Sep 28, 2022 at 12:56:28PM -0700, Elliot Berman wrote:
> [..]
> > diff --git a/drivers/mailbox/gunyah-msgq.c b/drivers/mailbox/gunyah-msgq.c
> [..]
> > +static int gh_msgq_send_data(struct mbox_chan *chan, void *data)
> > +{
> > +     struct gunyah_msgq *msgq = mbox_chan_to_msgq(chan);
> > +     struct gunyah_msgq_tx_data *msgq_data = data;
>
> The mailbox framework abstracts hardware mailboxes and @data
> should be the data to be written to the hardware.
>
> Using the void * to pass composite data types means that the client and
> provider are tightly coupled and as such the mailbox framework does not
> provide you any abstraction.
>
It is so for every platform, because there is no "standard format" in
which data is to be exchanged between endpoints.
Mailbox api is used mainly to avoid redoing message queuing and
response handling.

cheers.



More information about the linux-arm-kernel mailing list