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

Commit 685acd34 authored by Srinivasarao P's avatar Srinivasarao P Committed by Gerrit - the friendly Code Review server
Browse files

Revert "clk: Evict unregistered clks from parent caches"



This reverts commit 903c6bd9.

User build failing due to this upstream patch so reverting it.

Change-Id: Icb1e697d71ee18512b8ec1e5e2f8f4d7a9b7404e
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parent 0389e99d
Loading
Loading
Loading
Loading
+11 −42
Original line number Diff line number Diff line
@@ -52,18 +52,6 @@ struct clk_handoff_vdd {
static LIST_HEAD(clk_handoff_vdd_list);
static bool vdd_class_handoff_completed;
static DEFINE_MUTEX(vdd_class_list_lock);

static struct hlist_head *all_lists[] = {
	&clk_root_list,
	&clk_orphan_list,
	NULL,
};

static struct hlist_head *orphan_list[] = {
	&clk_orphan_list,
	NULL,
};

/*
 * clk_rate_change_list is used during clk_core_set_rate_nolock() calls to
 * handle vdd_class vote tracking.  core->rate_change_node is added to
@@ -3238,6 +3226,17 @@ static u32 debug_suspend;
static DEFINE_MUTEX(clk_debug_lock);
static HLIST_HEAD(clk_debug_list);

static struct hlist_head *all_lists[] = {
	&clk_root_list,
	&clk_orphan_list,
	NULL,
};

static struct hlist_head *orphan_list[] = {
	&clk_orphan_list,
	NULL,
};

static void clk_state_subtree(struct clk_core *c)
{
	int vdd_level = 0;
@@ -4513,34 +4512,6 @@ static const struct clk_ops clk_nodrv_ops = {
	.set_parent	= clk_nodrv_set_parent,
};

static void clk_core_evict_parent_cache_subtree(struct clk_core *root,
						struct clk_core *target)
{
	int i;
	struct clk_core *child;

	for (i = 0; i < root->num_parents; i++)
		if (root->parents[i] == target)
			root->parents[i] = NULL;

	hlist_for_each_entry(child, &root->children, child_node)
		clk_core_evict_parent_cache_subtree(child, target);
}

/* Remove this clk from all parent caches */
static void clk_core_evict_parent_cache(struct clk_core *core)
{
	struct hlist_head **lists;
	struct clk_core *root;

	lockdep_assert_held(&prepare_lock);

	for (lists = all_lists; *lists; lists++)
		hlist_for_each_entry(root, *lists, child_node)
			clk_core_evict_parent_cache_subtree(root, core);

}

/**
 * clk_unregister - unregister a currently registered clock
 * @clk: clock to unregister
@@ -4579,8 +4550,6 @@ void clk_unregister(struct clk *clk)
			clk_core_set_parent_nolock(child, NULL);
	}

	clk_core_evict_parent_cache(clk->core);

	hlist_del_init(&clk->core->child_node);

	if (clk->core->prepare_count)