From: bjorn.andersson@linaro.org (Bjorn Andersson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mailbox: add support for doorbell/signal mode controllers
Date: Wed, 1 Nov 2017 15:17:09 -0700 [thread overview]
Message-ID: <20171101221709.GB28761@minitux> (raw)
In-Reply-To: <59a05fcb-ff30-0683-144e-93521a7413f9@arm.com>
On Wed 01 Nov 11:15 PDT 2017, Sudeep Holla wrote:
>
> 80 writel_relaxed(msg->cmd, mb->mbox_base +
> MAILBOX_A2B_CMD(chans->idx));
> 81 writel_relaxed(msg->rx_size, mb->mbox_base +
>
> 82 MAILBOX_A2B_DAT(chans->idx));
>
> 83
This is just terrible, using the void *mssg to pass a struct which is
interpreted by the controller removes any form of abstraction provided
by the framework.
In my view the void *mssg should point to the data to be written in the
mailbox register, and hence might be of different size - but only of
native type.
Regards,
Bjorn
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] mailbox: add support for doorbell/signal mode controllers
Date: Wed, 1 Nov 2017 15:17:09 -0700 [thread overview]
Message-ID: <20171101221709.GB28761@minitux> (raw)
In-Reply-To: <59a05fcb-ff30-0683-144e-93521a7413f9@arm.com>
On Wed 01 Nov 11:15 PDT 2017, Sudeep Holla wrote:
>
> 80 writel_relaxed(msg->cmd, mb->mbox_base +
> MAILBOX_A2B_CMD(chans->idx));
> 81 writel_relaxed(msg->rx_size, mb->mbox_base +
>
> 82 MAILBOX_A2B_DAT(chans->idx));
>
> 83
This is just terrible, using the void *mssg to pass a struct which is
interpreted by the controller removes any form of abstraction provided
by the framework.
In my view the void *mssg should point to the data to be written in the
mailbox register, and hence might be of different size - but only of
native type.
Regards,
Bjorn
next prev parent reply other threads:[~2017-11-01 22:17 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 16:32 [PATCH] mailbox: add support for doorbell/signal mode controllers Sudeep Holla
2017-11-01 16:32 ` Sudeep Holla
2017-11-01 18:03 ` Jassi Brar
2017-11-01 18:03 ` Jassi Brar
2017-11-01 18:15 ` Sudeep Holla
2017-11-01 18:15 ` Sudeep Holla
2017-11-01 22:17 ` Bjorn Andersson [this message]
2017-11-01 22:17 ` Bjorn Andersson
2017-11-02 3:02 ` Jassi Brar
2017-11-02 3:02 ` Jassi Brar
2017-11-02 3:27 ` Bjorn Andersson
2017-11-02 3:27 ` Bjorn Andersson
2017-11-02 4:48 ` Jassi Brar
2017-11-02 4:48 ` Jassi Brar
2017-11-02 2:39 ` Jassi Brar
2017-11-02 2:39 ` Jassi Brar
2017-11-02 10:47 ` Sudeep Holla
2017-11-02 10:47 ` Sudeep Holla
2017-11-02 11:26 ` Jassi Brar
2017-11-02 11:26 ` Jassi Brar
2017-11-02 11:49 ` Sudeep Holla
2017-11-02 11:49 ` Sudeep Holla
2017-11-02 12:21 ` Jassi Brar
2017-11-02 12:21 ` Jassi Brar
2017-11-02 12:37 ` Sudeep Holla
2017-11-02 12:37 ` Sudeep Holla
2017-11-02 14:52 ` Jassi Brar
2017-11-02 14:52 ` Jassi Brar
2017-11-01 22:12 ` Bjorn Andersson
2017-11-01 22:12 ` Bjorn Andersson
2017-11-02 2:56 ` Jassi Brar
2017-11-02 2:56 ` Jassi Brar
2017-11-02 10:51 ` Sudeep Holla
2017-11-02 10:51 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171101221709.GB28761@minitux \
--to=bjorn.andersson@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.