interconnect: qcom: Use semantic names for BCM bandwidth fields
Subsystems (2)
PATCH 1/1 interconnect: qcom: Use semantic names for BCM bandwidth fields
Rename qcom_icc_bcm members vote_x, vote_y, and vote_scale to avg_bw, peak_bw, and bw_scale, respectively.
vote_x and vote_y are legacy names inherited from the low-level BCM vote encoding. They describe X and Y rather than the actual values, which represent average and peak bandwidth. At the command encoding level, X and Y make sense. In the data structure, they make readers remember an implementation detail that the code can name directly.
These names also match struct icc_node in <linux/interconnect.h>, which already uses avg_bw and peak_bw for the same bandwidth dimensions. Keeping the same terminology across the core API and the Qualcomm provider is preferable to maintaining a second naming scheme for the same concepts.
Sure, we could keep the vote_ prefix and use vote_avg_bw and vote_peak_bw. Both names would be valid. But qcom_icc_bcm already provides the voting context, so what exactly would that extra prefix explain? We would essentially say "vote" twice without making either bandwidth component any clearer.
Rename vote_scale to bw_scale as well.
Keep vote_x and vote_y unchanged in the TCS command interface, where they describe the hardware-level encoding rather than the BCM data structure.
--- drivers/interconnect/qcom/bcm-voter.c | 58 +++++++++++++-------------- drivers/interconnect/qcom/eliza.c | 4 +- drivers/interconnect/qcom/glymur.c | 6 +-- drivers/interconnect/qcom/hawi.c | 10 ++--- drivers/interconnect/qcom/icc-rpmh.c | 38 +++++++++--------- drivers/interconnect/qcom/icc-rpmh.h | 14 +++---- drivers/interconnect/qcom/kaanapali.c | 10 ++--- drivers/interconnect/qcom/kuno.c | 2 +- drivers/interconnect/qcom/maili.c | 12 +++--- drivers/interconnect/qcom/milos.c | 4 +- drivers/interconnect/qcom/nord.c | 8 ++-- drivers/interconnect/qcom/qcs615.c | 2 +- drivers/interconnect/qcom/qcs8300.c | 6 +-- drivers/interconnect/qcom/sa8775p.c | 6 +-- drivers/interconnect/qcom/sar2130p.c | 4 +- drivers/interconnect/qcom/sc7280.c | 4 +- drivers/interconnect/qcom/sc8280xp.c | 6 +-- drivers/interconnect/qcom/sdx75.c | 2 +- drivers/interconnect/qcom/sm8450.c | 6 +-- drivers/interconnect/qcom/sm8550.c | 6 +-- drivers/interconnect/qcom/sm8650.c | 6 +-- drivers/interconnect/qcom/sm8750.c | 6 +-- drivers/interconnect/qcom/x1e80100.c | 6 +-- 23 files changed, 113 insertions(+), 113 deletions(-)
drivers/interconnect/qcom/bcm-voter.c +29 -29
@@ -54,26 +54,26 @@ static void bcm_aggregate_mask(struct qcom_icc_bcm *bcm)int bucket, i;for (bucket =0 ; bucket <QCOM_ICC_NUM_BUCKETS ; bucket++) { - bcm->vote_x[bucket] =0 ; - bcm->vote_y[bucket] =0 ; + bcm->avg_bw[bucket] =0 ; + bcm->peak_bw[bucket] =0 ;for (i =0 ; i < bcm->num_nodes; i++) { node = bcm->nodes[i];/* If any vote in this bucket exists, keep the BCM enabled */ if (node->sum_avg[bucket] || node->max_peak[bucket]) { - bcm->vote_x[bucket] =0 ; - bcm->vote_y[bucket] = bcm->enable_mask; + bcm->avg_bw[bucket] =0 ; + bcm->peak_bw[bucket] = bcm->enable_mask;break ; } } }if (bcm->keepalive) { - bcm->vote_x[QCOM_ICC_BUCKET_AMC ] = bcm->enable_mask; - bcm->vote_x[QCOM_ICC_BUCKET_WAKE ] = bcm->enable_mask; - bcm->vote_y[QCOM_ICC_BUCKET_AMC ] = bcm->enable_mask; - bcm->vote_y[QCOM_ICC_BUCKET_WAKE ] = bcm->enable_mask; + bcm->avg_bw[QCOM_ICC_BUCKET_AMC ] = bcm->enable_mask; + bcm->avg_bw[QCOM_ICC_BUCKET_WAKE ] = bcm->enable_mask; + bcm->peak_bw[QCOM_ICC_BUCKET_AMC ] = bcm->enable_mask; + bcm->peak_bw[QCOM_ICC_BUCKET_WAKE ] = bcm->enable_mask; } }
@@ -97,19 +97,19 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm) agg_peak[bucket] =max (agg_peak[bucket], temp); } - temp = agg_avg[bucket] * bcm->vote_scale; - bcm->vote_x[bucket] =qcom_bw_div (temp,le32_to_cpu (bcm->aux_data.unit)); + temp = agg_avg[bucket] * bcm->bw_scale; + bcm->avg_bw[bucket] =qcom_bw_div (temp,le32_to_cpu (bcm->aux_data.unit)); - temp = agg_peak[bucket] * bcm->vote_scale; - bcm->vote_y[bucket] =qcom_bw_div (temp,le32_to_cpu (bcm->aux_data.unit)); + temp = agg_peak[bucket] * bcm->bw_scale; + bcm->peak_bw[bucket] =qcom_bw_div (temp,le32_to_cpu (bcm->aux_data.unit)); } -if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC ] ==0 && - bcm->vote_y[QCOM_ICC_BUCKET_AMC ] ==0 ) { - bcm->vote_x[QCOM_ICC_BUCKET_AMC ] =1 ; - bcm->vote_x[QCOM_ICC_BUCKET_WAKE ] =1 ; - bcm->vote_y[QCOM_ICC_BUCKET_AMC ] =1 ; - bcm->vote_y[QCOM_ICC_BUCKET_WAKE ] =1 ; +if (bcm->keepalive && bcm->avg_bw[QCOM_ICC_BUCKET_AMC ] ==0 && + bcm->peak_bw[QCOM_ICC_BUCKET_AMC ] ==0 ) { + bcm->avg_bw[QCOM_ICC_BUCKET_AMC ] =1 ; + bcm->avg_bw[QCOM_ICC_BUCKET_WAKE ] =1 ; + bcm->peak_bw[QCOM_ICC_BUCKET_AMC ] =1 ; + bcm->peak_bw[QCOM_ICC_BUCKET_WAKE ] =1 ; } }
@@ -164,8 +164,8 @@ static void tcs_list_gen(struct bcm_voter *voter, int bucket, wait = commit && (voter->tcs_wait &BIT (bucket)); -tcs_cmd_gen (&tcs_list[idx], bcm->vote_x[bucket], - bcm->vote_y[bucket], bcm->addr, commit, wait); +tcs_cmd_gen (&tcs_list[idx], bcm->avg_bw[bucket], + bcm->peak_bw[bucket], bcm->addr, commit, wait); idx++; n[batch]++;/*
@@ -260,7 +260,7 @@ void qcom_icc_bcm_get_bw(struct bcm_voter *voter, {struct tcs_cmd cmd = { .addr = bcm->addr };int ret, i; -u64 x, y; +u64 avg_bw, peak_bw;mutex_lock (&voter->lock);
@@ -270,13 +270,13 @@ void qcom_icc_bcm_get_bw(struct bcm_voter *voter, goto out; } - x =FIELD_GET (BCM_TCS_CMD_VOTE_X_MASK , cmd.data); - y =FIELD_GET (BCM_TCS_CMD_VOTE_Y_MASK , cmd.data); + avg_bw =FIELD_GET (BCM_TCS_CMD_VOTE_X_MASK , cmd.data); + peak_bw =FIELD_GET (BCM_TCS_CMD_VOTE_Y_MASK , cmd.data);/* For boot-up, fill the AMC vote in all buckets */ for (i =0 ; i <QCOM_ICC_NUM_BUCKETS ; i++) { - bcm->vote_x[i] = x; - bcm->vote_y[i] = y; + bcm->avg_bw[i] = avg_bw; + bcm->peak_bw[i] = peak_bw; } out:
@@ -351,10 +351,10 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)* requirements change as the execution environment transitions * between different power states. */ -if (bcm->vote_x[QCOM_ICC_BUCKET_WAKE ] != - bcm->vote_x[QCOM_ICC_BUCKET_SLEEP ] || - bcm->vote_y[QCOM_ICC_BUCKET_WAKE ] != - bcm->vote_y[QCOM_ICC_BUCKET_SLEEP ]) +if (bcm->avg_bw[QCOM_ICC_BUCKET_WAKE ] != + bcm->avg_bw[QCOM_ICC_BUCKET_SLEEP ] || + bcm->peak_bw[QCOM_ICC_BUCKET_WAKE ] != + bcm->peak_bw[QCOM_ICC_BUCKET_SLEEP ])list_add_tail (&bcm->list, &voter->commit_list);else list_del_init (&bcm->ws_list);
drivers/interconnect/qcom/eliza.c +2 -2
@@ -1187,7 +1187,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup1_core_slave },
@@ -1195,7 +1195,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup2_core_slave },
drivers/interconnect/qcom/glymur.c +3 -3
@@ -1764,7 +1764,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup0_core_slave },
@@ -1772,7 +1772,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup1_core_slave },
@@ -1780,7 +1780,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup2_core_slave },
drivers/interconnect/qcom/hawi.c +5 -5
@@ -1441,7 +1441,7 @@ static struct qcom_icc_bcm bcm_qpc0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1449,7 +1449,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1457,7 +1457,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
@@ -1465,7 +1465,7 @@ static struct qcom_icc_bcm bcm_qup2 = {static struct qcom_icc_bcm bcm_qup3 = { .name ="QUP3" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup3_core_slave }, };
@@ -1473,7 +1473,7 @@ static struct qcom_icc_bcm bcm_qup3 = {static struct qcom_icc_bcm bcm_qup4 = { .name ="QUP4" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup4_core_slave }, };
drivers/interconnect/qcom/icc-rpmh.c +19 -19
@@ -141,7 +141,7 @@ static int qcom_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak)struct qcom_icc_node *qn = node->data;u32 avg_max =0 ;u32 peak_max =0 ; -u64 x, y; +u64 avg_bw, peak_bw;int i;if (!qn->num_bcms) {
@@ -155,32 +155,32 @@ static int qcom_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak)struct qcom_icc_bcm *bcm = qn->bcms[i];/* Use AMC vote for boot-up */ - x = bcm->vote_x[QCOM_ICC_BUCKET_AMC ]; - y = bcm->vote_y[QCOM_ICC_BUCKET_AMC ]; + avg_bw = bcm->avg_bw[QCOM_ICC_BUCKET_AMC ]; + peak_bw = bcm->peak_bw[QCOM_ICC_BUCKET_AMC ];/* Consider enable mask and convert to INT_MAX */ if (bcm->enable_mask) { -if (x & bcm->enable_mask) +if (avg_bw & bcm->enable_mask) avg_max =INT_MAX ; -if (y & bcm->enable_mask) +if (peak_bw & bcm->enable_mask) peak_max =INT_MAX ; }else { -if (x) { - x *=le32_to_cpu (bcm->aux_data.unit); -do_div (x, bcm->vote_scale); - x *= qn->buswidth * qn->channels; -do_div (x,le16_to_cpu (bcm->aux_data.width)); +if (avg_bw) { + avg_bw *=le32_to_cpu (bcm->aux_data.unit); +do_div (avg_bw, bcm->bw_scale); + avg_bw *= qn->buswidth * qn->channels; +do_div (avg_bw,le16_to_cpu (bcm->aux_data.width)); - avg_max =max (avg_max, x); + avg_max =max (avg_max, avg_bw); } -if (y) { - y *=le32_to_cpu (bcm->aux_data.unit); -do_div (y, bcm->vote_scale); - y *= qn->buswidth; -do_div (y,le16_to_cpu (bcm->aux_data.width)); +if (peak_bw) { + peak_bw *=le32_to_cpu (bcm->aux_data.unit); +do_div (peak_bw, bcm->bw_scale); + peak_bw *= qn->buswidth; +do_div (peak_bw,le16_to_cpu (bcm->aux_data.width)); - peak_max =max (peak_max, y); + peak_max =max (peak_max, peak_bw); } } }
@@ -232,8 +232,8 @@ int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev)INIT_LIST_HEAD (&bcm->list);INIT_LIST_HEAD (&bcm->ws_list); -if (!bcm->vote_scale) - bcm->vote_scale =1000 ; +if (!bcm->bw_scale) + bcm->bw_scale =1000 ;/* Link Qnodes to their respective BCMs */ for (i =0 ; i < bcm->num_nodes; i++) {
drivers/interconnect/qcom/icc-rpmh.h +7 -7
@@ -112,10 +112,10 @@ struct qcom_icc_node {* @name: the bcm node name used to fetch BCM data from command db * @type: latency or bandwidth bcm * @addr: address offsets used when voting to RPMH -* @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm -* @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm -* @vote_scale: scaling factor for vote_x and vote_y -* @enable_mask: optional mask to send as vote instead of vote_x/vote_y +* @avg_bw: aggregate representing sum of average bandwidth for bandwidth BCMs +* @peak_bw: aggregate representing peak bandwidth for bandwidth BCMs +* @bw_scale: bandwidth scaling factor for @avg_bw and @peak_bw +* @enable_mask: optional mask voted instead of @avg_bw/@peak_bw * @dirty: flag used to indicate whether the bcm needs to be committed * @keepalive: flag used to indicate whether a keepalive is required * @aux_data: auxiliary data used when calculating threshold values and
@@ -129,9 +129,9 @@ struct qcom_icc_bcm {const char *name;u32 type;u32 addr; -u64 vote_x[QCOM_ICC_NUM_BUCKETS ]; -u64 vote_y[QCOM_ICC_NUM_BUCKETS ]; -u64 vote_scale; +u64 avg_bw[QCOM_ICC_NUM_BUCKETS ]; +u64 peak_bw[QCOM_ICC_NUM_BUCKETS ]; +u64 bw_scale;u32 enable_mask;bool dirty;bool keepalive;
drivers/interconnect/qcom/kaanapali.c +5 -5
@@ -1320,7 +1320,7 @@ static struct qcom_icc_bcm bcm_qpc0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1328,7 +1328,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1336,7 +1336,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
@@ -1344,7 +1344,7 @@ static struct qcom_icc_bcm bcm_qup2 = {static struct qcom_icc_bcm bcm_qup3 = { .name ="QUP3" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup3_core_slave }, };
@@ -1352,7 +1352,7 @@ static struct qcom_icc_bcm bcm_qup3 = {static struct qcom_icc_bcm bcm_qup4 = { .name ="QUP4" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup4_core_slave }, };
drivers/interconnect/qcom/kuno.c +1 -1
@@ -708,7 +708,7 @@ static struct qcom_icc_bcm bcm_mc0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
drivers/interconnect/qcom/maili.c +6 -6
@@ -1488,7 +1488,7 @@ static struct qcom_icc_bcm bcm_qpc0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup0_core_slave },
@@ -1496,7 +1496,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup1_core_slave },
@@ -1504,7 +1504,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup2_core_slave },
@@ -1512,7 +1512,7 @@ static struct qcom_icc_bcm bcm_qup2 = {static struct qcom_icc_bcm bcm_qup3 = { .name ="QUP3" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup3_core_slave },
@@ -1520,7 +1520,7 @@ static struct qcom_icc_bcm bcm_qup3 = {static struct qcom_icc_bcm bcm_qup4 = { .name ="QUP4" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup4_core_slave },
@@ -1528,7 +1528,7 @@ static struct qcom_icc_bcm bcm_qup4 = {static struct qcom_icc_bcm bcm_qup5 = { .name ="QUP5" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup5_core_slave },
drivers/interconnect/qcom/milos.c +2 -2
@@ -1438,7 +1438,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1446,7 +1446,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
drivers/interconnect/qcom/nord.c +4 -4
@@ -1949,7 +1949,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup0_core_slave },
@@ -1957,7 +1957,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup1_core_slave },
@@ -1965,7 +1965,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup2_core_slave },
@@ -1973,7 +1973,7 @@ static struct qcom_icc_bcm bcm_qup2 = {static struct qcom_icc_bcm bcm_qup3 = { .name ="QUP3" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup3_core_slave },
drivers/interconnect/qcom/qcs615.c +1 -1
@@ -1277,7 +1277,7 @@ static struct qcom_icc_bcm bcm_mm3 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =2 , .nodes = { &qhm_qup0, &qhm_qup1 }, };
drivers/interconnect/qcom/qcs8300.c +3 -3
@@ -1780,7 +1780,7 @@ static struct qcom_icc_bcm bcm_pci0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup0_core_slave },
@@ -1788,7 +1788,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup1_core_slave },
@@ -1796,7 +1796,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .keepalive = true, .num_nodes =1 , .nodes = { &qup3_core_slave },
drivers/interconnect/qcom/sa8775p.c +3 -3
@@ -2073,21 +2073,21 @@ static struct qcom_icc_bcm bcm_pci0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =2 , .nodes = { &qup2_core_slave, &qup3_core_slave }, };
drivers/interconnect/qcom/sar2130p.c +2 -2
@@ -1395,7 +1395,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1403,7 +1403,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
drivers/interconnect/qcom/sc7280.c +2 -2
@@ -1494,14 +1494,14 @@ static struct qcom_icc_bcm bcm_mm5 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
drivers/interconnect/qcom/sc8280xp.c +3 -3
@@ -2147,21 +2147,21 @@ static struct qcom_icc_bcm bcm_pci0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
drivers/interconnect/qcom/sdx75.c +1 -1
@@ -776,7 +776,7 @@ static struct qcom_icc_bcm bcm_mc0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
drivers/interconnect/qcom/sm8450.c +3 -3
@@ -1357,7 +1357,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1365,7 +1365,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1373,7 +1373,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
drivers/interconnect/qcom/sm8550.c +3 -3
@@ -1153,7 +1153,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1161,7 +1161,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1169,7 +1169,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
drivers/interconnect/qcom/sm8650.c +3 -3
@@ -1517,7 +1517,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1525,7 +1525,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1533,7 +1533,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
drivers/interconnect/qcom/sm8750.c +3 -3
@@ -1111,7 +1111,7 @@ static struct qcom_icc_bcm bcm_mm1 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1119,7 +1119,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1127,7 +1127,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
drivers/interconnect/qcom/x1e80100.c +3 -3
@@ -1390,7 +1390,7 @@ static struct qcom_icc_bcm bcm_pc0 = {static struct qcom_icc_bcm bcm_qup0 = { .name ="QUP0" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup0_core_slave }, };
@@ -1398,7 +1398,7 @@ static struct qcom_icc_bcm bcm_qup0 = {static struct qcom_icc_bcm bcm_qup1 = { .name ="QUP1" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup1_core_slave }, };
@@ -1406,7 +1406,7 @@ static struct qcom_icc_bcm bcm_qup1 = {static struct qcom_icc_bcm bcm_qup2 = { .name ="QUP2" , .keepalive = true, - .vote_scale =1 , + .bw_scale =1 , .num_nodes =1 , .nodes = { &qup2_core_slave }, };
Signature · 1 line
2.56.0
Quoted 4 lines · Ängsblomsterskymningen Zefir Månskensåkerhöjden Zetterstrand
Rename
qcom_icc_bcmmembersvote_x,vote_y, andvote_scaletoavg_bw,peak_bw, andbw_scale, respectively.
vote_xandvote_yare legacy names inherited from the low-level BCM vote encoding. They describe X and Y rather than the actual values, which represent average and peak bandwidth. At the command encoding level, X and Y make sense. In the data structure, they make readers remember an implementation detail that the code can name directly.
Quoted 8 lines
These names also match struct
icc_nodein <linux/interconnect.h>, which already usesavg_bwandpeak_bwfor the same bandwidth dimensions. Keeping the same terminology across the core API and the Qualcomm provider is preferable to maintaining a second naming scheme for the same concepts.Sure, we could keep the
vote_prefix and usevote_avg_bwandvote_peak_bw. Both names would be valid. Butqcom_icc_bcmalready provides the voting context, so what exactly would that extra prefix explain? We would essentially say "vote" twice without making either bandwidth component any clearer.Rename
vote_scaletobw_scaleas well.Keep
vote_xandvote_yunchanged in the TCS command interface, where they describe the hardware-level encoding rather than the BCM data structure.
This is not a properly formatted commit message.