From: "Maulik Shah (mkshah)" <quic_mkshah@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<quic_eberman@quicinc.com>, <quic_collinsd@quicinc.com>,
<quic_lsrao@quicinc.com>
Subject: Re: [PATCH v2] soc: qcom: rpmh-rsc: Enhance check for VREG in-flight request
Date: Mon, 29 Jan 2024 11:50:40 +0530 [thread overview]
Message-ID: <589dddd8-0ed2-4138-a617-402aa28c79da@quicinc.com> (raw)
In-Reply-To: <xjcefuurfbv7oquotsmm4iv4pnwzoone7jxrm42vjsnpfcgk4z@mnrsxec43bhp>
Hi,
On 1/28/2024 9:13 AM, Bjorn Andersson wrote:
> On Fri, Jan 19, 2024 at 01:56:54PM +0530, Maulik Shah wrote:
>>
>> Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
>> Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
>
> The s-o-b chain doesn't look right.
I will fix in v3.
>
>> ---
>>
>> +#define ACCL_TYPE(addr) FIELD_GET(GENMASK(19, 16), addr)
>
> Command DB is there so we don't have to make assumptions about the
> addresses of resources. As such, I dislike this define.
sure i will consider querying command db for resource type.
>
>> +#define VREG_ADDR(addr) FIELD_GET(GENMASK(19, 4), addr)
>> +
>> +enum {
>> + HW_ACCL_CLK = 0x3,
>> + HW_ACCL_VREG,
>> + HW_ACCL_BUS,
>
> We already define these in the kernel, but with different names:
> CMD_DB_HW_ARC, CMD_DB_HW_VRM, CMD_DB_HW_BCM. I see no reason to use
> different names for the same thing.
>
>> +};
Right, I missed it, With querying cmd-db would not need this enum.
>> +
>> /*
>> * Here's a high level overview of how all the registers in RPMH work
>> * together:
>> @@ -557,7 +568,15 @@ static int check_for_req_inflight(struct rsc_drv *drv, struct tcs_group *tcs,
>> for_each_set_bit(j, &curr_enabled, MAX_CMDS_PER_TCS) {
>> addr = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_ADDR], i, j);
>> for (k = 0; k < msg->num_cmds; k++) {
>> - if (addr == msg->cmds[k].addr)
>> + /*
>> + * Each RPMh VREG accelerator resource has 3 or 4 contiguous 4-byte
>> + * aligned addresses associated with it. Ignore the offset to check
>> + * for in-flight VREG requests.
>> + */
>> + if (ACCL_TYPE(msg->cmds[k].addr) == HW_ACCL_VREG &&
>> + VREG_ADDR(msg->cmds[k].addr) == VREG_ADDR(addr))
>
> I'm sure this work, at least for some targets, but I don't fancy
> encoding this information here. It feels like a hack.
>
> Furthermore, I really would like TP_printk() of trace_rpmh_send_msg() to
> be able to resolve the symbolic names for VRMs as well, and it would
> need the same information...
I can update in separate patch for trace_() to resolve symbolic names.
>
> Please consider how we can query command db for the type and/or grouping
> information.
Sure, i will update in v3 to query command db for the type.
Thanks,
Maulik
prev parent reply other threads:[~2024-01-29 6:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 8:26 Maulik Shah
2024-01-19 10:34 ` Bryan O'Donoghue
2024-01-19 11:30 ` Bryan O'Donoghue
2024-01-19 15:47 ` Andrew Halaney
2024-01-19 17:59 ` Elliot Berman
2024-01-29 6:27 ` Maulik Shah (mkshah)
2024-01-20 0:18 ` Konrad Dybcio
2024-01-28 3:43 ` Bjorn Andersson
2024-01-29 6:20 ` Maulik Shah (mkshah) [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=589dddd8-0ed2-4138-a617-402aa28c79da@quicinc.com \
--to=quic_mkshah@quicinc.com \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_collinsd@quicinc.com \
--cc=quic_eberman@quicinc.com \
--cc=quic_lsrao@quicinc.com \
/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®