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

Commit ab0ea3bf authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers/base: cacheinfo: validate device node for all the caches"

parents ca492577 c1e92e89
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -62,15 +62,21 @@ static int cache_setup_of_node(unsigned int cpu)
		return -ENOENT;
	}

	while (np && index < cache_leaves(cpu)) {
	while (index < cache_leaves(cpu)) {
		this_leaf = this_cpu_ci->info_list + index;
		if (this_leaf->level != 1)
			np = of_find_next_cache_node(np);
		else
			np = of_node_get(np);/* cpu node itself */
		if (!np)
			break;
		this_leaf->of_node = np;
		index++;
	}

	if (index != cache_leaves(cpu)) /* not all OF nodes populated */
		return -ENOENT;

	return 0;
}

@@ -189,8 +195,11 @@ static int detect_cache_attributes(unsigned int cpu)
	 * will be set up here only if they are not populated already
	 */
	ret = cache_shared_cpu_map_setup(cpu);
	if (ret)
	if (ret) {
		pr_warn("Unable to detect cache hierarcy from DT for CPU %d\n",
			cpu);
		goto free_ci;
	}
	return 0;

free_ci: