Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1206216ybf; Thu, 27 Feb 2020 06:48:26 -0800 (PST) X-Google-Smtp-Source: APXvYqz/qtNe1KdFW7eXwXJ+oGjadhTaMpW/gnACMg1DEtqNmmL9yPLWVFck302LZWcTBVNQa83w X-Received: by 2002:a05:6808:24e:: with SMTP id m14mr3696092oie.168.1582814906542; Thu, 27 Feb 2020 06:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582814906; cv=none; d=google.com; s=arc-20160816; b=r7Wfw9jTeViAv48zEr2Oj6Njmid47tKKlIMBI/8rDKwdZiw7Oc3+nSBajHFbI0b7HX bXGGIaMJHP89dr/pF2f3U2dMlk18hyPZ2QHIXa5g9B5ctpo/464bP09Z5IkaXVxoQSyT j0JszI1ltbxVeaVzgRlNRXLC8uBr957vTVbIVbD678jqt5PPHRo1z4nnaK82lEvWWvFT WYcbjkQ/rSs+SF7fm2YZPTSp0kHiZHmz5cmP2vaK+YjUu9h2um241nxxwsCEdquZ4FiL QeOn5A5z70L433wvvBuEUi83aLwqYOTo+CjSqTqYTjEclm37gmFm0zWeBwrWKpuBMFq0 eRvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:autocrypt :openpgp:from:references:cc:to:subject:dkim-signature; bh=bRBVzm7LmsESKTnCqWwBanH8FICpCOc4WhuYig3TGrY=; b=MfFPvRNpAEsPa1sjzIbF9un2IzNJPSDcRpQaf6+/o6gxKEUlRHJxqR3IKIvVd5dtdi MtTuuKZHIO1HbifGTnkEEV12pZOtbfH/2Zzz/nVna6N2hkMjajC9BIAyyOgHjU5PL09A ZpYfPw2GinhlyWvnBs/mhrsYR7OPGeQnwOFA2IIomSd6VyfM0yzpiqRmfaDjKhZvXeEm Ttp7NTEVtnldEriqVYbcdo0Cz2GLV07Zr1X+5Qgh3gwblW2pARAltQItf0FcvB+jxX/q 1t6oeYB6UwEqLThAoA8kCIz9cABiRmgQ0M8E0ZAfqf97KgR/UWzQ7GywVnhd8Of0RFXo 35lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oxD1yVks; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l204si1503170oig.31.2020.02.27.06.48.14; Thu, 27 Feb 2020 06:48:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oxD1yVks; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731069AbgB0OrB (ORCPT + 99 others); Thu, 27 Feb 2020 09:47:01 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43515 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730283AbgB0Noy (ORCPT ); Thu, 27 Feb 2020 08:44:54 -0500 Received: by mail-wr1-f65.google.com with SMTP id c13so3376328wrq.10 for ; Thu, 27 Feb 2020 05:44:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bRBVzm7LmsESKTnCqWwBanH8FICpCOc4WhuYig3TGrY=; b=oxD1yVksx5FhGgGokg268at9nOg2OPkGr/R7GsuVaEgPOdQOBg5Etzvs9PSLYtqM2l CZGF67SEWhZEDL7J8ahBDe6xf0Zz0fToAxU3DijpB69N6Io50emD9vKcB+fCigK8okDs 5qskwoAVQc+fiFX2LjtN7K71G4d/XoMCgviAF0NPTP5xZHlQVgmtuoacXZaMNkfWEXru P3UOaMNT16J1yp6A3qPMXK5a3oWuRxLqSOsROTD62C3YKhQXHcUOv8BHZ2mDpWfrtFVX HOzA3R7dcvNaaj+30Odd5gc4Xm+lPqMDwh9TXMJADs76USaKS5N8gcDh/KySSwfsynVU EeYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bRBVzm7LmsESKTnCqWwBanH8FICpCOc4WhuYig3TGrY=; b=GIaYAGgNirsGnUndMRyHTORm9rZviKWtSE392JOwHhTJrt9lWjSs18zukJlAKDkBHd OfJ+k1UN2folM7PU/mX9WfT8jMVacQZe5zcgKnINkDX10SFMtj9lpa5sW3Dqhl6KJV65 Cz/D53MpVNKxxwNAQxyJCOplukGvO22Z1YUtoyg7IJ7sIrTxhphxqnFnGZtASFE5Vk83 j47+7RnmvUmi2p+QQQ0X3jQVTcf8bK2YPXFjoEGDw1S40CN4LWfKjLIW8fj8zipk+Dl1 3nqSlZSa530g9X5/8shHlsHZFS2K6iLfpMLRlUTU2qdXC/aQ/A8BK3s1XKJhTc7YYKvT 0muw== X-Gm-Message-State: APjAAAVhqOp2XsGQDiYwT7fhxmQ22evpcAh24smVZjF4n9BCp4QOWO0t Z/+jgt2F4qXt+tcADnhJgob9kg== X-Received: by 2002:adf:e38d:: with SMTP id e13mr4787598wrm.133.1582811091737; Thu, 27 Feb 2020 05:44:51 -0800 (PST) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id c74sm8187080wmd.26.2020.02.27.05.44.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Feb 2020 05:44:50 -0800 (PST) Subject: Re: [PATCH v3 4/6] interconnect: qcom: Consolidate interconnect RPMh support To: Sibi Sankar , robh+dt@kernel.org, evgreen@chromium.org Cc: bjorn.andersson@linaro.org, agross@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, mark.rutland@arm.com, daidavid1@codeaurora.org, saravanak@google.com, mka@chromium.org, linux-pm@vger.kernel.org, Odelu Kukatla References: <20200209183411.17195-1-sibis@codeaurora.org> <20200209183411.17195-5-sibis@codeaurora.org> From: Georgi Djakov Openpgp: preference=signencrypt Autocrypt: addr=georgi.djakov@linaro.org; prefer-encrypt=mutual; keydata= mQINBFjTuRcBEACyAOVzghvyN19Sa/Nit4LPBWkICi5W20p6bwiZvdjhtuh50H5q4ktyxJtp 1+s8dMSa/j58hAWhrc2SNL3fttOCo+MM1bQWwe8uMBQJP4swgXf5ZUYkSssQlXxGKqBSbWLB uFHOOBTzaQBaNgsdXo+mQ1h8UCgM0zQOmbs2ort8aHnH2i65oLs5/Xgv/Qivde/FcFtvEFaL 0TZ7odM67u+M32VetH5nBVPESmnEDjRBPw/DOPhFBPXtal53ZFiiRr6Bm1qKVu3dOEYXHHDt nF13gB+vBZ6x5pjl02NUEucSHQiuCc2Aaavo6xnuBc3lnd4z/xk6GLBqFP3P/eJ56eJv4d0B 0LLgQ7c1T3fU4/5NDRRCnyk6HJ5+HSxD4KVuluj0jnXW4CKzFkKaTxOp7jE6ZD/9Sh74DM8v etN8uwDjtYsM07I3Szlh/I+iThxe/4zVtUQsvgXjwuoOOBWWc4m4KKg+W4zm8bSCqrd1DUgL f67WiEZgvN7tPXEzi84zT1PiUOM98dOnmREIamSpKOKFereIrKX2IcnZn8jyycE12zMkk+Sc ASMfXhfywB0tXRNmzsywdxQFcJ6jblPNxscnGMh2VlY2rez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ebzcKGbdEr6vySGa3Cof+miX06hQXKe99a5+eHNhtZJcMAIO89wZmj 7ayYJIXFqjl/X0KBcCbiAl4vbdBw1bqFnO4zd1lMXKVoa29UHqby4MPbQhjWNVv9kqp8A39+ E9xw890l1xdERkjVKX6IEJu2hf7X3MMl9tOjBK6MvdOUxvh1bNNmXh7OlBL1MpJYY/ydIm3B KEmKjLDvB0pePJkdTw== Message-ID: <921917e6-45d3-f9c5-6519-5f3b8116d9ec@linaro.org> Date: Thu, 27 Feb 2020 15:44:48 +0200 MIME-Version: 1.0 In-Reply-To: <20200209183411.17195-5-sibis@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sibi, Thank you for refreshing this patchset! On 2/9/20 20:34, Sibi Sankar wrote: > From: David Dai > > Add bcm voter driver and add support for RPMh specific interconnect > providers which implements the set and aggregate functionalities that > translates bandwidth requests into RPMh messages. These modules provide > a common set of functionalities for all Qualcomm RPMh based interconnect > providers and should help reduce code duplication when adding new > providers. > > Signed-off-by: David Dai > Signed-off-by: Odelu Kukatla > Signed-off-by: Sibi Sankar > --- > drivers/interconnect/qcom/Kconfig | 13 +- > drivers/interconnect/qcom/Makefile | 4 + > drivers/interconnect/qcom/bcm-voter.c | 366 ++++++++++++++++++++++++++ > drivers/interconnect/qcom/bcm-voter.h | 27 ++ > drivers/interconnect/qcom/icc-rpmh.c | 147 +++++++++++ > drivers/interconnect/qcom/icc-rpmh.h | 149 +++++++++++ > 6 files changed, 705 insertions(+), 1 deletion(-) > create mode 100644 drivers/interconnect/qcom/bcm-voter.c > create mode 100644 drivers/interconnect/qcom/bcm-voter.h > create mode 100644 drivers/interconnect/qcom/icc-rpmh.c > create mode 100644 drivers/interconnect/qcom/icc-rpmh.h > > diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig > index 76938ece1658e..08cfd676b4299 100644 > --- a/drivers/interconnect/qcom/Kconfig > +++ b/drivers/interconnect/qcom/Kconfig > @@ -5,6 +5,11 @@ config INTERCONNECT_QCOM > help > Support for Qualcomm's Network-on-Chip interconnect hardware. > > +config INTERCONNECT_QCOM_BCM_VOTER > + tristate > + depends on INTERCONNECT_QCOM || COMPILE_TEST > + depends on QCOM_RPMH && OF This is not user-selectable, but has a "depends on" lines... > + > config INTERCONNECT_QCOM_MSM8916 > tristate "Qualcomm MSM8916 interconnect driver" > depends on INTERCONNECT_QCOM > @@ -32,10 +37,16 @@ config INTERCONNECT_QCOM_QCS404 > This is a driver for the Qualcomm Network-on-Chip on qcs404-based > platforms. > > +config INTERCONNECT_QCOM_RPMH > + tristate > + depends on INTERCONNECT_QCOM || COMPILE_TEST > + depends on QCOM_COMMAND_DB > + > config INTERCONNECT_QCOM_SDM845 > tristate "Qualcomm SDM845 interconnect driver" > depends on INTERCONNECT_QCOM > - depends on (QCOM_RPMH && QCOM_COMMAND_DB && OF) || COMPILE_TEST > + select INTERCONNECT_QCOM_RPMH > + select INTERCONNECT_QCOM_BCM_VOTER ...and these selects will force a symbol to a value without checking its dependencies. So i was wondering whether this will cause any problems. > help > This is a driver for the Qualcomm Network-on-Chip on sdm845-based > platforms. > diff --git a/drivers/interconnect/qcom/Makefile b/drivers/interconnect/qcom/Makefile > index e8271575e3d8a..d591bb56273b1 100644 [..] > +static const struct of_device_id bcm_voter_of_match[] = { > + { .compatible = "qcom,bcm-voter" }, > + { } > +}; > + > +static struct platform_driver qcom_icc_bcm_voter_driver = { > + .probe = qcom_icc_bcm_voter_probe, > + .driver = { > + .name = "sdm845_bcm_voter", Nit: This is not just about sdm845 anymore, so maybe qcom_bcm_voter. > + .of_match_table = bcm_voter_of_match, > + }, > +}; > +module_platform_driver(qcom_icc_bcm_voter_driver); > + > +MODULE_AUTHOR("David Dai "); > +MODULE_DESCRIPTION("Qualcomm BCM Voter interconnect driver"); > +MODULE_LICENSE("GPL v2"); > diff --git a/drivers/interconnect/qcom/bcm-voter.h b/drivers/interconnect/qcom/bcm-voter.h > new file mode 100644 > index 0000000000000..3436673e9f104 > --- /dev/null [.] > diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c > new file mode 100644 > index 0000000000000..e9443b50e0b48 > --- /dev/null > +++ b/drivers/interconnect/qcom/icc-rpmh.c > @@ -0,0 +1,147 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2020, The Linux Foundation. All rights reserved. > + */ > + > +#include > +#include > + > +#include "bcm-voter.h" > +#include "icc-rpmh.h" > + > +/** > + * qcom_icc_pre_aggregate - cleans up stale values from prior icc_set > + * @node: icc node to operate on > + */ > +void qcom_icc_pre_aggregate(struct icc_node *node) > +{ > + size_t i; > + struct qcom_icc_node *qn; > + > + qn = node->data; > + > + for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) { > + qn->sum_avg[i] = 0; > + qn->max_peak[i] = 0; > + } > +} > +EXPORT_SYMBOL_GPL(qcom_icc_pre_aggregate); > + > +/** > + * qcom_icc_aggregate - aggregate bw for buckets indicated by tag > + * @node: node to aggregate > + * @tag: tag to indicate which buckets to aggregate > + * @avg_bw: new bw to sum aggregate > + * @peak_bw: new bw to max aggregate > + * @agg_avg: existing aggregate avg bw val > + * @agg_peak: existing aggregate peak bw val > + */ > +int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, > + u32 peak_bw, u32 *agg_avg, u32 *agg_peak) > +{ > + size_t i; > + struct qcom_icc_node *qn; > + struct qcom_icc_provider *qp; > + > + qn = node->data; > + qp = to_qcom_provider(node->provider); > + > + if (!tag) > + tag = QCOM_ICC_TAG_ALWAYS; > + > + for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) { > + if (tag & BIT(i)) { > + qn->sum_avg[i] += avg_bw; > + qn->max_peak[i] = max_t(u32, qn->max_peak[i], peak_bw); > + } > + } > + > + *agg_avg += avg_bw; > + *agg_peak = max_t(u32, *agg_peak, peak_bw); > + > + for (i = 0; i < qn->num_bcms; i++) > + qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]); > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(qcom_icc_aggregate); > + > +/** > + * qcom_icc_set - set the constraints based on path > + * @src: source node for the path to set constraints on > + * @dst: destination node for the path to set constraints on > + * > + * Return: 0 on success, or an error code otherwise > + */ > +int qcom_icc_set(struct icc_node *src, struct icc_node *dst) > +{ > + struct qcom_icc_provider *qp; > + struct icc_node *node; > + > + if (!src) > + node = dst; > + else > + node = src; > + > + qp = to_qcom_provider(node->provider); > + > + qcom_icc_bcm_voter_commit(qp->voter); > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(qcom_icc_set); > + > +/** > + * qcom_icc_bcm_init - populates bcm aux data and connect qnodes > + * @bcm: bcm to be initialized > + * @dev: associated provider device > + * > + * Return: 0 on success, or an error code otherwise > + */ > +int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev) > +{ > + struct qcom_icc_node *qn; > + const struct bcm_db *data; > + size_t data_count; > + int i; > + > + /* BCM is already initialised*/ > + if (bcm->addr) > + return 0; > + > + bcm->addr = cmd_db_read_addr(bcm->name); > + if (!bcm->addr) { > + dev_err(dev, "%s could not find RPMh address\n", > + bcm->name); > + return -EINVAL; > + } > + > + data = cmd_db_read_aux_data(bcm->name, &data_count); > + if (IS_ERR(data)) { > + dev_err(dev, "%s command db read error (%ld)\n", > + bcm->name, PTR_ERR(data)); > + return PTR_ERR(data); > + } > + if (!data_count) { > + dev_err(dev, "%s command db missing or partial aux data\n", > + bcm->name); > + return -EINVAL; > + } > + > + bcm->aux_data.unit = le32_to_cpu(data->unit); > + bcm->aux_data.width = le16_to_cpu(data->width); > + bcm->aux_data.vcd = data->vcd; > + bcm->aux_data.reserved = data->reserved; > + INIT_LIST_HEAD(&bcm->list); > + INIT_LIST_HEAD(&bcm->ws_list); > + > + /* Link Qnodes to their respective BCMs */ > + for (i = 0; i < bcm->num_nodes; i++) { > + qn = bcm->nodes[i]; > + qn->bcms[qn->num_bcms] = bcm; > + qn->num_bcms++; > + } > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(qcom_icc_bcm_init); When i tried building this as a module i see the following warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/interconnect/qcom/icc-rpmh.o So we may want to include module.h and add MODULE_LICENSE("GPL v2") as specified in the SPDX tag. Thanks, Georgi