[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220929165908.zgmlujhp42ihine5@builder.lan>
Date: Thu, 29 Sep 2022 11:59:08 -0500
From: Bjorn Andersson <andersson@...nel.org>
To: Elliot Berman <quic_eberman@...cinc.com>
Cc: Bjorn Andersson <quic_bjorande@...cinc.com>,
Jassi Brar <jassisinghbrar@...il.com>,
Murali Nalajala <quic_mnalajal@...cinc.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
Srivatsa Vaddagiri <quic_svaddagi@...cinc.com>,
Carl van Schaik <quic_cvanscha@...cinc.com>,
Andy Gross <agross@...nel.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
linux-arm-kernel@...ts.infradead.org,
Mark Rutland <mark.rutland@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Sudeep Holla <sudeep.holla@....com>,
Marc Zyngier <maz@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Jonathan Corbet <corbet@....net>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 09/14] mailbox: Add Gunyah message queue mailbox
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.
You also only expose a single channel, so a direct function call between
the two specific drivers would be a better fit.
Regards,
Bjorn
Powered by blists - more mailing lists