mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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 <quic_bjorande@quicinc.com> Tested-by: Steev Klimaszewski <steev@kali.org> Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com> Link: https://lore.kernel.org/r/20221111032515.3460-5-quic_bjorande@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
This commit is contained in:
parent
9235253ec7
commit
b6bcef163a
@ -134,22 +134,14 @@ static int qcom_osm_l3_set(struct icc_node *src, struct icc_node *dst)
|
||||
struct qcom_osm_l3_icc_provider *qp;
|
||||
struct icc_provider *provider;
|
||||
const struct qcom_osm_l3_node *qn;
|
||||
struct icc_node *n;
|
||||
unsigned int index;
|
||||
u32 agg_peak = 0;
|
||||
u32 agg_avg = 0;
|
||||
u64 rate;
|
||||
|
||||
qn = src->data;
|
||||
provider = src->provider;
|
||||
qp = to_osm_l3_provider(provider);
|
||||
|
||||
list_for_each_entry(n, &provider->nodes, node_list)
|
||||
provider->aggregate(n, 0, n->avg_bw, n->peak_bw,
|
||||
&agg_avg, &agg_peak);
|
||||
|
||||
rate = max(agg_avg, agg_peak);
|
||||
rate = icc_units_to_bps(rate);
|
||||
rate = icc_units_to_bps(dst->peak_bw);
|
||||
do_div(rate, qn->buswidth);
|
||||
|
||||
for (index = 0; index < qp->max_state - 1; index++) {
|
||||
|
Loading…
Reference in New Issue
Block a user