From: Maulik Shah <mkshah@codeaurora.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
Andy Gross <agross@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Lina Iyer <ilina@codeaurora.org>,
Srinivas Rao L <lsrao@codeaurora.org>,
Stephen Boyd <swboyd@chromium.org>
Subject: Re: [PATCH v2] soc: qcom: rpmh: Remove serialization of TCS commands
Date: Thu, 7 Jan 2021 14:07:52 +0530 [thread overview]
Message-ID: <e74ed5ba-8b5f-638a-62f5-19eb2501ce1a@codeaurora.org> (raw)
In-Reply-To: <CAD=FV=V60zVYkFGQvAu6qfpumBL6+fm_9ziRCSiN7Um7+ra6zw@mail.gmail.com>
Hi Doug,
On 12/4/2020 3:14 AM, Doug Anderson wrote:
> Hi,
>
> On Mon, Nov 23, 2020 at 11:32 PM Maulik Shah <mkshah@codeaurora.org> wrote:
>> @@ -423,8 +422,7 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
>> cmd = &req->cmds[j];
>> sts = read_tcs_cmd(drv, RSC_DRV_CMD_STATUS, i, j);
>> if (!(sts & CMD_STATUS_ISSUED) ||
>> - ((req->wait_for_compl || cmd->wait) &&
>> - !(sts & CMD_STATUS_COMPL))) {
>> + (cmd->wait && !(sts & CMD_STATUS_COMPL))) {
>> pr_err("Incomplete request: %s: addr=%#x data=%#x",
>> drv->name, cmd->addr, cmd->data);
>> err = -EIO;
> In my review of v1 all those months ago, the way we left things was
> that I disagreed with this part of the patch, and I still do. I think
> you should leave things the way they were in tcs_tx_done(). Copying
> my un-responded-to comments from v1 here for you:
>
> In your patch in __tcs_buffer_write(), if "wait_for_compl" is set then
> "CMD_MSGID_RESP_REQ" will be added for every message in the request,
> right? That's because you have this bit of code:
>
> /* Convert all commands to RR when the request has wait_for_compl set */
> cmd_msgid |= msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0;
>
> That means that if _either_ "cmd->wait" or "req->wait_for_compl" is
> set then you expect the "sts" to have "CMD_STATUS_COMPL", right?
> That's exactly the code that used to be there.
>
> Said another way, if "req->wait_for_compl" was set then it's an error
> if any of our commands are missing the "CMD_STATUS_COMPL" bit, right?
>
>
>> @@ -30,7 +30,7 @@ enum rpmh_state {
>> *
>> * @addr: the address of the resource slv_id:18:16 | offset:0:15
>> * @data: the resource state request
>> - * @wait: wait for this request to be complete before sending the next
>> + * @wait: ensure that this command is complete before returning
> In my response to v1 I suggested that a comment would be nice here.
> Something akin to:
>
> Setting "wait" here only makes sense in the batch case for active-only
> transfers.
>
> This is because:
> * rpmh_write_async() - There's no callback and rpmh_write_async()
> doesn't set the "completion" to anything so there's nobody that cares
> at all
>
> * DEFINE_RPMH_MSG_ONSTACK - always sets wait_for_compl.
>
> -Doug
Addressed both comments and sent v3.
Thanks,
Maulik
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
prev parent reply other threads:[~2021-01-07 8:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 7:31 Maulik Shah
2020-12-03 21:44 ` Doug Anderson
2021-01-07 8:37 ` Maulik Shah [this message]
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=e74ed5ba-8b5f-638a-62f5-19eb2501ce1a@codeaurora.org \
--to=mkshah@codeaurora.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=ilina@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsrao@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=swboyd@chromium.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
all inboxes | Powered by JetHome®