Skip to content

Commit 64fe9a8

Browse files
committed
Merge tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-work-linus
Georgi writes: interconnect fixes for v6.9-rc Here are fixes for two reported issues. One of them is a fix for a driver that tries to access a non-existent resource which prints a warning message during boot. The other one is fixing a race condition in the core framework where one struct member has been left unprotected by mutex. - interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM - interconnect: Don't access req_list while it's being manipulated Signed-off-by: Georgi Djakov <[email protected]> * tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: Don't access req_list while it's being manipulated interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
2 parents c8d2f34 + de1bf25 commit 64fe9a8

File tree

2 files changed

+8
-26
lines changed

2 files changed

+8
-26
lines changed

drivers/interconnect/core.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
176176

177177
path->num_nodes = num_nodes;
178178

179+
mutex_lock(&icc_bw_lock);
180+
179181
for (i = num_nodes - 1; i >= 0; i--) {
180182
node->provider->users++;
181183
hlist_add_head(&path->reqs[i].req_node, &node->req_list);
@@ -186,6 +188,8 @@ static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
186188
node = node->reverse;
187189
}
188190

191+
mutex_unlock(&icc_bw_lock);
192+
189193
return path;
190194
}
191195

@@ -792,12 +796,16 @@ void icc_put(struct icc_path *path)
792796
pr_err("%s: error (%d)\n", __func__, ret);
793797

794798
mutex_lock(&icc_lock);
799+
mutex_lock(&icc_bw_lock);
800+
795801
for (i = 0; i < path->num_nodes; i++) {
796802
node = path->reqs[i].node;
797803
hlist_del(&path->reqs[i].req_node);
798804
if (!WARN_ON(!node->provider->users))
799805
node->provider->users--;
800806
}
807+
808+
mutex_unlock(&icc_bw_lock);
801809
mutex_unlock(&icc_lock);
802810

803811
kfree_const(path->name);

drivers/interconnect/qcom/x1e80100.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,6 @@ static struct qcom_icc_node xm_sdc2 = {
116116
.links = { X1E80100_SLAVE_A2NOC_SNOC },
117117
};
118118

119-
static struct qcom_icc_node ddr_perf_mode_master = {
120-
.name = "ddr_perf_mode_master",
121-
.id = X1E80100_MASTER_DDR_PERF_MODE,
122-
.channels = 1,
123-
.buswidth = 4,
124-
.num_links = 1,
125-
.links = { X1E80100_SLAVE_DDR_PERF_MODE },
126-
};
127-
128119
static struct qcom_icc_node qup0_core_master = {
129120
.name = "qup0_core_master",
130121
.id = X1E80100_MASTER_QUP_CORE_0,
@@ -688,14 +679,6 @@ static struct qcom_icc_node qns_a2noc_snoc = {
688679
.links = { X1E80100_MASTER_A2NOC_SNOC },
689680
};
690681

691-
static struct qcom_icc_node ddr_perf_mode_slave = {
692-
.name = "ddr_perf_mode_slave",
693-
.id = X1E80100_SLAVE_DDR_PERF_MODE,
694-
.channels = 1,
695-
.buswidth = 4,
696-
.num_links = 0,
697-
};
698-
699682
static struct qcom_icc_node qup0_core_slave = {
700683
.name = "qup0_core_slave",
701684
.id = X1E80100_SLAVE_QUP_CORE_0,
@@ -1377,12 +1360,6 @@ static struct qcom_icc_bcm bcm_acv = {
13771360
.nodes = { &ebi },
13781361
};
13791362

1380-
static struct qcom_icc_bcm bcm_acv_perf = {
1381-
.name = "ACV_PERF",
1382-
.num_nodes = 1,
1383-
.nodes = { &ddr_perf_mode_slave },
1384-
};
1385-
13861363
static struct qcom_icc_bcm bcm_ce0 = {
13871364
.name = "CE0",
13881365
.num_nodes = 1,
@@ -1583,18 +1560,15 @@ static const struct qcom_icc_desc x1e80100_aggre2_noc = {
15831560
};
15841561

15851562
static struct qcom_icc_bcm * const clk_virt_bcms[] = {
1586-
&bcm_acv_perf,
15871563
&bcm_qup0,
15881564
&bcm_qup1,
15891565
&bcm_qup2,
15901566
};
15911567

15921568
static struct qcom_icc_node * const clk_virt_nodes[] = {
1593-
[MASTER_DDR_PERF_MODE] = &ddr_perf_mode_master,
15941569
[MASTER_QUP_CORE_0] = &qup0_core_master,
15951570
[MASTER_QUP_CORE_1] = &qup1_core_master,
15961571
[MASTER_QUP_CORE_2] = &qup2_core_master,
1597-
[SLAVE_DDR_PERF_MODE] = &ddr_perf_mode_slave,
15981572
[SLAVE_QUP_CORE_0] = &qup0_core_slave,
15991573
[SLAVE_QUP_CORE_1] = &qup1_core_slave,
16001574
[SLAVE_QUP_CORE_2] = &qup2_core_slave,

0 commit comments

Comments
 (0)