Commit 64fe9a8f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'icc-6.9-rc2' of...

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: default avatarGeorgi Djakov <djakov@kernel.org>

* 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
parents c8d2f34e de1bf25b
...@@ -176,6 +176,8 @@ static struct icc_path *path_init(struct device *dev, struct icc_node *dst, ...@@ -176,6 +176,8 @@ static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
path->num_nodes = num_nodes; path->num_nodes = num_nodes;
mutex_lock(&icc_bw_lock);
for (i = num_nodes - 1; i >= 0; i--) { for (i = num_nodes - 1; i >= 0; i--) {
node->provider->users++; node->provider->users++;
hlist_add_head(&path->reqs[i].req_node, &node->req_list); 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, ...@@ -186,6 +188,8 @@ static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
node = node->reverse; node = node->reverse;
} }
mutex_unlock(&icc_bw_lock);
return path; return path;
} }
...@@ -792,12 +796,16 @@ void icc_put(struct icc_path *path) ...@@ -792,12 +796,16 @@ void icc_put(struct icc_path *path)
pr_err("%s: error (%d)\n", __func__, ret); pr_err("%s: error (%d)\n", __func__, ret);
mutex_lock(&icc_lock); mutex_lock(&icc_lock);
mutex_lock(&icc_bw_lock);
for (i = 0; i < path->num_nodes; i++) { for (i = 0; i < path->num_nodes; i++) {
node = path->reqs[i].node; node = path->reqs[i].node;
hlist_del(&path->reqs[i].req_node); hlist_del(&path->reqs[i].req_node);
if (!WARN_ON(!node->provider->users)) if (!WARN_ON(!node->provider->users))
node->provider->users--; node->provider->users--;
} }
mutex_unlock(&icc_bw_lock);
mutex_unlock(&icc_lock); mutex_unlock(&icc_lock);
kfree_const(path->name); kfree_const(path->name);
......
...@@ -116,15 +116,6 @@ static struct qcom_icc_node xm_sdc2 = { ...@@ -116,15 +116,6 @@ static struct qcom_icc_node xm_sdc2 = {
.links = { X1E80100_SLAVE_A2NOC_SNOC }, .links = { X1E80100_SLAVE_A2NOC_SNOC },
}; };
static struct qcom_icc_node ddr_perf_mode_master = {
.name = "ddr_perf_mode_master",
.id = X1E80100_MASTER_DDR_PERF_MODE,
.channels = 1,
.buswidth = 4,
.num_links = 1,
.links = { X1E80100_SLAVE_DDR_PERF_MODE },
};
static struct qcom_icc_node qup0_core_master = { static struct qcom_icc_node qup0_core_master = {
.name = "qup0_core_master", .name = "qup0_core_master",
.id = X1E80100_MASTER_QUP_CORE_0, .id = X1E80100_MASTER_QUP_CORE_0,
...@@ -688,14 +679,6 @@ static struct qcom_icc_node qns_a2noc_snoc = { ...@@ -688,14 +679,6 @@ static struct qcom_icc_node qns_a2noc_snoc = {
.links = { X1E80100_MASTER_A2NOC_SNOC }, .links = { X1E80100_MASTER_A2NOC_SNOC },
}; };
static struct qcom_icc_node ddr_perf_mode_slave = {
.name = "ddr_perf_mode_slave",
.id = X1E80100_SLAVE_DDR_PERF_MODE,
.channels = 1,
.buswidth = 4,
.num_links = 0,
};
static struct qcom_icc_node qup0_core_slave = { static struct qcom_icc_node qup0_core_slave = {
.name = "qup0_core_slave", .name = "qup0_core_slave",
.id = X1E80100_SLAVE_QUP_CORE_0, .id = X1E80100_SLAVE_QUP_CORE_0,
...@@ -1377,12 +1360,6 @@ static struct qcom_icc_bcm bcm_acv = { ...@@ -1377,12 +1360,6 @@ static struct qcom_icc_bcm bcm_acv = {
.nodes = { &ebi }, .nodes = { &ebi },
}; };
static struct qcom_icc_bcm bcm_acv_perf = {
.name = "ACV_PERF",
.num_nodes = 1,
.nodes = { &ddr_perf_mode_slave },
};
static struct qcom_icc_bcm bcm_ce0 = { static struct qcom_icc_bcm bcm_ce0 = {
.name = "CE0", .name = "CE0",
.num_nodes = 1, .num_nodes = 1,
...@@ -1583,18 +1560,15 @@ static const struct qcom_icc_desc x1e80100_aggre2_noc = { ...@@ -1583,18 +1560,15 @@ static const struct qcom_icc_desc x1e80100_aggre2_noc = {
}; };
static struct qcom_icc_bcm * const clk_virt_bcms[] = { static struct qcom_icc_bcm * const clk_virt_bcms[] = {
&bcm_acv_perf,
&bcm_qup0, &bcm_qup0,
&bcm_qup1, &bcm_qup1,
&bcm_qup2, &bcm_qup2,
}; };
static struct qcom_icc_node * const clk_virt_nodes[] = { static struct qcom_icc_node * const clk_virt_nodes[] = {
[MASTER_DDR_PERF_MODE] = &ddr_perf_mode_master,
[MASTER_QUP_CORE_0] = &qup0_core_master, [MASTER_QUP_CORE_0] = &qup0_core_master,
[MASTER_QUP_CORE_1] = &qup1_core_master, [MASTER_QUP_CORE_1] = &qup1_core_master,
[MASTER_QUP_CORE_2] = &qup2_core_master, [MASTER_QUP_CORE_2] = &qup2_core_master,
[SLAVE_DDR_PERF_MODE] = &ddr_perf_mode_slave,
[SLAVE_QUP_CORE_0] = &qup0_core_slave, [SLAVE_QUP_CORE_0] = &qup0_core_slave,
[SLAVE_QUP_CORE_1] = &qup1_core_slave, [SLAVE_QUP_CORE_1] = &qup1_core_slave,
[SLAVE_QUP_CORE_2] = &qup2_core_slave, [SLAVE_QUP_CORE_2] = &qup2_core_slave,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment