Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 933d3af2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "interconnect: Add helpers for enabling/disabling a path"



This reverts commit 5335bb0c which is
commit 7d374b20908338c9fbb03ea8022a11f3b3e0e55f upstream.

It breaks the Android abi.  If it is required in the future, it can
come back in an abi-safe way.

Bug: 161946584
Change-Id: Ib8055fa9cc98b8884b49de2588d45ceff8b9a2e3
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 9caf727a
Loading
Loading
Loading
Loading
+1 −38
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
		hlist_add_head(&path->reqs[i].req_node, &node->req_list);
		path->reqs[i].node = node;
		path->reqs[i].dev = dev;
		path->reqs[i].enabled = true;
		/* reference to previous node was saved during path traversal */
		node = node->reverse;
	}
@@ -186,12 +185,9 @@ static int aggregate_requests(struct icc_node *node)
	if (p->pre_aggregate)
		p->pre_aggregate(node);

	hlist_for_each_entry(r, &node->req_list, req_node) {
		if (!r->enabled)
			continue;
	hlist_for_each_entry(r, &node->req_list, req_node)
		p->aggregate(node, r->tag, r->avg_bw, r->peak_bw,
			     &node->avg_bw, &node->peak_bw);
	}

	return 0;
}
@@ -473,39 +469,6 @@ int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
}
EXPORT_SYMBOL_GPL(icc_set_bw);

static int __icc_enable(struct icc_path *path, bool enable)
{
	int i;

	if (!path)
		return 0;

	if (WARN_ON(IS_ERR(path) || !path->num_nodes))
		return -EINVAL;

	mutex_lock(&icc_lock);

	for (i = 0; i < path->num_nodes; i++)
		path->reqs[i].enabled = enable;

	mutex_unlock(&icc_lock);

	return icc_set_bw(path, path->reqs[0].avg_bw,
			  path->reqs[0].peak_bw);
}

int icc_enable(struct icc_path *path)
{
	return __icc_enable(path, true);
}
EXPORT_SYMBOL_GPL(icc_enable);

int icc_disable(struct icc_path *path)
{
	return __icc_enable(path, false);
}
EXPORT_SYMBOL_GPL(icc_disable);

/**
 * icc_get() - return a handle for path between two endpoints
 * @dev: the device requesting the path
+0 −2
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
 * @req_node: entry in list of requests for the particular @node
 * @node: the interconnect node to which this constraint applies
 * @dev: reference to the device that sets the constraints
 * @enabled: indicates whether the path with this request is enabled
 * @tag: path tag (optional)
 * @avg_bw: an integer describing the average bandwidth in kBps
 * @peak_bw: an integer describing the peak bandwidth in kBps
@@ -23,7 +22,6 @@ struct icc_req {
	struct hlist_node req_node;
	struct icc_node *node;
	struct device *dev;
	bool enabled;
	u32 tag;
	u32 avg_bw;
	u32 peak_bw;
+0 −12
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ struct icc_path *icc_get(struct device *dev, const int src_id,
			 const int dst_id);
struct icc_path *of_icc_get(struct device *dev, const char *name);
void icc_put(struct icc_path *path);
int icc_enable(struct icc_path *path);
int icc_disable(struct icc_path *path);
int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw);
void icc_set_tag(struct icc_path *path, u32 tag);

@@ -52,16 +50,6 @@ static inline void icc_put(struct icc_path *path)
{
}

static inline int icc_enable(struct icc_path *path)
{
	return 0;
}

static inline int icc_disable(struct icc_path *path)
{
	return 0;
}

static inline int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
{
	return 0;