mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maulik Shah <maulik.shah@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Mark Brown <broonie@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH 1/2] soc: qcom: rpmh-rsc: Update CMD_MSGID_LEN to 4 bytes for read request
Date: Fri, 11 Sep 2026 13:44:50 +0530	[thread overview]
Message-ID: <9a0379d4-8263-4688-8a39-71dcedf6da8b@oss.qualcomm.com> (raw)
In-Reply-To: <aqK0D-dnQEi9cwCA@baldur>


On 10-09-2026 19:21, Bjorn Andersson wrote:
> On Thu, Sep 10, 2026 at 02:23:01PM +0530, Maulik Shah wrote:
[...]
>  
>  	/* Convert all commands to RR when the request has wait_for_compl set */
>  	cmd_msgid |= msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0;
> -	if (!msg->is_read)
> -		cmd_msgid |= CMD_MSGID_WRITE;
> +	if (!msg->is_read) {
> +		cmd_msgid = CMD_MSGID_LEN | CMD_MSGID_WRITE;
> I know this follows the current code, but CMD_MSGID_LEN doesn't seem
> like a "fixed" part of this message anymore. It seems rather that
> there's a few bits here which denotes the CMD_MSGID_LEN and the value
> thereof is either 8 or 4.
>
> If this is the case, I'd find it cleaner to define CMD_MSGID_LEN_MASK
> and then just FIELD_PREP() to put a 4 or a 8 in the "length field" of
> the command.

Yes, updating v2 to use  FIELD_PREP().

>
>> +	} else {
>> +		if (drv->ver.major >= 4 && drv->ver.minor >= 5)
>> +			cmd_msgid = CMD_MSGID_LEN_READ_v4_5;
> If I understand your commit message, this line says "on DRV 4.5 and
> higher length is 4 otherwise it's 8" - but there's no way anyone can
> read this line and come to that conclusion.
>
> In contrast, this would actually say that:
>   cmd_msgid |= FIELD_PREP(CMD_MSGID_LEN, 4);

I will update to use FIELD_PREP.

>
>
> Also, is this really supposed to apply to DRV versions such as 5.5, but
> not 6.1?

I will update version check in v2.

Thanks,
Maulik

  reply	other threads:[~2026-09-11  8:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  8:53 [PATCH 0/2] soc: qcom: rpmh-rsc: Updates for RPMh read requests Maulik Shah
2026-09-10  8:53 ` [PATCH 1/2] soc: qcom: rpmh-rsc: Update CMD_MSGID_LEN to 4 bytes for read request Maulik Shah
2026-09-10  9:01   ` Konrad Dybcio
2026-09-11  4:53     ` Maulik Shah
2026-09-10 11:59   ` Mukesh Ojha
2026-09-10 13:51   ` Bjorn Andersson
2026-09-11  8:14     ` Maulik Shah [this message]
2026-09-10  8:53 ` [PATCH 2/2] soc: qcom: rpmh-rsc: Skip read requests on unsupported platforms Maulik Shah
2026-09-10  9:14   ` Konrad Dybcio

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=9a0379d4-8263-4688-8a39-71dcedf6da8b@oss.qualcomm.com \
    --to=maulik.shah@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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®