From: Stephen Boyd <sboyd@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
Jitendra Sharma <shajit@codeaurora.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] rpmsg: qcom_smd: Access APCS through mailbox framework
Date: Wed, 6 Dec 2017 11:54:27 -0800 [thread overview]
Message-ID: <21b097d0-91ed-5cdc-83b0-4594dffaab6a@codeaurora.org> (raw)
In-Reply-To: <20171206190232.GR28761@minitux>
On 12/06/2017 11:02 AM, Bjorn Andersson wrote:
> On Wed 06 Dec 04:08 PST 2017, Jitendra Sharma wrote:
>
>> Hi Bjorn,
>>
> Hi Jitendra,
>
>> On 11/16/2017 12:38 PM, Bjorn Andersson wrote:
> [..]
>>> @@ -365,7 +371,12 @@ static void qcom_smd_signal_channel(struct qcom_smd_channel *channel)
>>> {
>>> struct qcom_smd_edge *edge = channel->edge;
>>> - regmap_write(edge->ipc_regmap, edge->ipc_offset, BIT(edge->ipc_bit));
>>> + if (edge->mbox_chan) {
>>> + mbox_send_message(edge->mbox_chan, NULL);
>> mbox_send_message could fail. So return value should be checked
> qcom_apcs_ipc_send_data() can't fail, so the case when
> mbox_send_message() would fail is if more than MBOX_TX_QUEUE_LEN (20)
> callers that has managed to put their data in the queue but not yet
> execute msg_submit().
>
> As each bit in the APCS IPC register is modelled as it's own mailbox
> channel this error case would mean that as mbox_send_message() returns
> with an error there will soon be 20 callers entering
> qcom_apcs_ipc_send_data() and trigger this very bit.
>
>
> When this happens mbox_send_message() will print an error in the log, so
> there's no point in having the caller also print an error.
>
> When it comes to dealing with a failing call to mbox_send_message() we
> have already posted the message in the FIFO, so we have no way to abort
> the transmission, as such the only way to deal with this is to either
> retry or ignore the problem; and the mailbox queue will ensure that we
> retry 20 times.
>
Maybe you should wrap this up into a comment in the code? Then we don't
have to dig this out of the mail list archives to figure out why we
aren't checking for an error.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-12-06 19:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 7:08 [PATCH] rpmsg: qcom_smd: Access APCS through mailbox framework Bjorn Andersson
2017-11-16 12:09 ` Arun Kumar Neelakantam
2017-12-06 12:08 ` Jitendra Sharma
2017-12-06 19:02 ` Bjorn Andersson
2017-12-06 19:54 ` Stephen Boyd [this message]
2017-12-06 21:55 ` Bjorn Andersson
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=21b097d0-91ed-5cdc-83b0-4594dffaab6a@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=shajit@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox