Re: [PATCH v3 1/4] interconnect: qcom: icc-rpmh: Add QoS configuration support

From: Odelu Kukatla
Date: Wed Mar 20 2024 - 13:59:52 EST




On 3/6/2024 9:48 PM, Konrad Dybcio wrote:
>
>
> On 3/6/24 08:30, Odelu Kukatla wrote:
>> It adds QoS support for QNOC device and includes support for
>> configuring priority, priority forward disable, urgency forwarding.
>> This helps in priortizing the traffic originating from different
>> interconnect masters at NoC(Network On Chip).
>>
>> Signed-off-by: Odelu Kukatla <quic_okukatla@xxxxxxxxxxx>
>> ---
>> drivers/interconnect/qcom/icc-rpmh.c | 105 +++++++++++++++++++++++++++
>> drivers/interconnect/qcom/icc-rpmh.h | 32 ++++++++
>> 2 files changed, 137 insertions(+)
>>
>> diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c
>> index c1aa265c1f4e..b4681849df80 100644
>> --- a/drivers/interconnect/qcom/icc-rpmh.c
>> +++ b/drivers/interconnect/qcom/icc-rpmh.c
>> @@ -1,19 +1,57 @@
>> // SPDX-License-Identifier: GPL-2.0
>> /*
>> * Copyright (c) 2020, The Linux Foundation. All rights reserved.
>> + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> */
>>
>> +#include <linux/clk.h>
>> #include <linux/interconnect.h>
>> #include <linux/interconnect-provider.h>
>> #include <linux/module.h>
>> #include <linux/of.h>
>> #include <linux/of_platform.h>
>> #include <linux/slab.h>
>> +#include <linux/bitfield.h>
>
> Please keep the alphabetical order
>

I will address this in next version.

>>
>> #include "bcm-voter.h"
>> #include "icc-common.h"
>> #include "icc-rpmh.h"
>>
>> +/* QNOC QoS */
>> +#define QOSGEN_MAINCTL_LO(p, qp) (0x8 + (p->port_offsets[qp]))
>> +#define QOS_SLV_URG_MSG_EN_MASK BIT_MASK(3)
>
> Mixing BIT_MASK and GENMASK is very confusing..
>

I will fix this in v4.

>> +#define QOS_DFLT_PRIO_MASK GENMASK(6, 4)
>> +#define QOS_DISABLE_MASK BIT_MASK(24)
>> +
>> +/**
>> + * qcom_icc_set_qos - initialize static QoS configurations
>> + * @qp: qcom icc provider to which @node belongs
>> + * @node: qcom icc node to operate on
>> + */
>> +static void qcom_icc_set_qos(struct qcom_icc_provider *qp,
>> + struct qcom_icc_node *node)
>> +{
>> + const struct qcom_icc_qosbox *qos = node->qosbox;
>> + int port;
>> +
>> + if (!qp->regmap || !qos)
>> + return;
>
> This is not possible if you follow the code flow, I think..
>
> [...]
>

Right, it is not needed.

>> + * @prio: priority value assigned to requests on the node
>> + * @urg_fwd: whether to forward the urgency promotion issued by master(endpoint), or discard
>
> space before the opening brace, please also wrap to 80 lines
>

I will fix this in v4.

>> + * @prio_fwd_disable: whether to forward the priority driven by mster, or override by @prio
>
> typo: mster, please also wrap it
>
> Konrad

Thanks,
Odelu