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

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

Merge "cpu/cacheinfo: Fix teardown path"

parents 5ac41825 0449e9d4
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -148,7 +148,11 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)

			if (sibling == cpu) /* skip itself */
				continue;

			sib_cpu_ci = get_cpu_cacheinfo(sibling);
			if (!sib_cpu_ci->info_list)
				continue;

			sib_leaf = sib_cpu_ci->info_list + index;
			cpumask_clear_cpu(cpu, &sib_leaf->shared_cpu_map);
			cpumask_clear_cpu(sibling, &this_leaf->shared_cpu_map);
@@ -159,6 +163,9 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)

static void free_cache_attributes(unsigned int cpu)
{
	if (!per_cpu_cacheinfo(cpu))
		return;

	cache_shared_cpu_map_remove(cpu);

	kfree(per_cpu_cacheinfo(cpu));
@@ -520,7 +527,6 @@ static int cacheinfo_cpu_callback(struct notifier_block *nfb,
		break;
	case CPU_DEAD:
		cache_remove_dev(cpu);
		if (per_cpu_cacheinfo(cpu))
		free_cache_attributes(cpu);
		break;
	}