linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Tipton <mdtipton@codeaurora.org>
To: djakov@kernel.org
Cc: bjorn.andersson@linaro.org, agross@kernel.org,
	saravanak@google.com, okukatla@codeaurora.org,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Mike Tipton <mdtipton@codeaurora.org>
Subject: [PATCH 2/4] interconnect: Always call pre_aggregate before aggregate
Date: Fri, 25 Jun 2021 14:28:37 -0700	[thread overview]
Message-ID: <20210625212839.24155-3-mdtipton@codeaurora.org> (raw)
In-Reply-To: <20210625212839.24155-1-mdtipton@codeaurora.org>

The pre_aggregate callback isn't called in all cases before calling
aggregate. Add the missing calls so providers can rely on consistent
framework behavior.

Fixes: d3703b3e255f ("interconnect: Aggregate before setting initial bandwidth")
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
---
 drivers/interconnect/core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 945121e18b5c..cfd54c90a6bb 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -973,9 +973,12 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider)
 	}
 	node->avg_bw = node->init_avg;
 	node->peak_bw = node->init_peak;
-	if (provider->aggregate)
+	if (provider->aggregate) {
+		if (provider->pre_aggregate)
+			provider->pre_aggregate(node);
 		provider->aggregate(node, 0, node->init_avg, node->init_peak,
 				    &node->avg_bw, &node->peak_bw);
+	}
 	provider->set(node, node);
 	node->avg_bw = 0;
 	node->peak_bw = 0;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


  parent reply	other threads:[~2021-06-25 21:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 21:28 [PATCH 0/4] interconnect: Fix sync-state issues Mike Tipton
2021-06-25 21:28 ` [PATCH 1/4] interconnect: Zero initial BW after sync-state Mike Tipton
2021-07-01 16:56   ` okukatla
2021-07-12 15:41     ` Mike Tipton
2021-06-25 21:28 ` Mike Tipton [this message]
2021-07-01 18:55   ` [PATCH 2/4] interconnect: Always call pre_aggregate before aggregate okukatla
2021-07-12 15:39     ` Mike Tipton
2021-06-25 21:28 ` [PATCH 3/4] interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes Mike Tipton
2021-06-26  2:27   ` kernel test robot
2021-07-01 18:48   ` okukatla
2021-07-12 15:45     ` Mike Tipton
2021-06-25 21:28 ` [PATCH 4/4] interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate Mike Tipton

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=20210625212839.24155-3-mdtipton@codeaurora.org \
    --to=mdtipton@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=djakov@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=okukatla@codeaurora.org \
    --cc=saravanak@google.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;
as well as URLs for NNTP newsgroup(s).