Skip to content

Commit 91b4498

Browse files
Georgi Djakovgregkh
authored andcommitted
interconnect: Do not skip aggregation for disabled paths
When an interconnect path is being disabled, currently we don't aggregate the requests for it afterwards. But the re-aggregation step shouldn't be skipped, as it may leave the nodes with outdated bandwidth data. This outdated data may actually keep the path still enabled and prevent the device from going into lower power states. Reported-by: Atul Dhudase <[email protected]> Fixes: 7d374b2 ("interconnect: Add helpers for enabling/disabling a path") Reviewed-by: Sibi Sankar <[email protected]> Tested-by: Atul Dhudase <[email protected]> Reviewed-by: Atul Dhudase <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b34e7e2 commit 91b4498

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/interconnect/core.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ static int aggregate_requests(struct icc_node *node)
243243
{
244244
struct icc_provider *p = node->provider;
245245
struct icc_req *r;
246+
u32 avg_bw, peak_bw;
246247

247248
node->avg_bw = 0;
248249
node->peak_bw = 0;
@@ -251,9 +252,14 @@ static int aggregate_requests(struct icc_node *node)
251252
p->pre_aggregate(node);
252253

253254
hlist_for_each_entry(r, &node->req_list, req_node) {
254-
if (!r->enabled)
255-
continue;
256-
p->aggregate(node, r->tag, r->avg_bw, r->peak_bw,
255+
if (r->enabled) {
256+
avg_bw = r->avg_bw;
257+
peak_bw = r->peak_bw;
258+
} else {
259+
avg_bw = 0;
260+
peak_bw = 0;
261+
}
262+
p->aggregate(node, r->tag, avg_bw, peak_bw,
257263
&node->avg_bw, &node->peak_bw);
258264
}
259265

0 commit comments

Comments
 (0)