Skip to content

Commit b6bcef1

Browse files
quic-bjorandeGeorgi Djakov
authored andcommitted
interconnect: qcom: osm-l3: Simplify osm_l3_set()
The aggregation over votes for all nodes in the provider will always only find the bandwidth votes for the destination side of the path. Further more, the average kBps value will always be 0. Simplify the logic by directly looking at the destination node's peak bandwidth request. Signed-off-by: Bjorn Andersson <[email protected]> Tested-by: Steev Klimaszewski <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 9235253 commit b6bcef1

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

drivers/interconnect/qcom/osm-l3.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,14 @@ static int qcom_osm_l3_set(struct icc_node *src, struct icc_node *dst)
134134
struct qcom_osm_l3_icc_provider *qp;
135135
struct icc_provider *provider;
136136
const struct qcom_osm_l3_node *qn;
137-
struct icc_node *n;
138137
unsigned int index;
139-
u32 agg_peak = 0;
140-
u32 agg_avg = 0;
141138
u64 rate;
142139

143140
qn = src->data;
144141
provider = src->provider;
145142
qp = to_osm_l3_provider(provider);
146143

147-
list_for_each_entry(n, &provider->nodes, node_list)
148-
provider->aggregate(n, 0, n->avg_bw, n->peak_bw,
149-
&agg_avg, &agg_peak);
150-
151-
rate = max(agg_avg, agg_peak);
152-
rate = icc_units_to_bps(rate);
144+
rate = icc_units_to_bps(dst->peak_bw);
153145
do_div(rate, qn->buswidth);
154146

155147
for (index = 0; index < qp->max_state - 1; index++) {

0 commit comments

Comments
 (0)