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

Commit 81e10d42 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: base: arch_topology: swap the order of updating shared_cap_level"

parents e5adae35 52190baa
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -158,9 +158,9 @@ int detect_share_cap_flag(void)
		if (!policy)
			return 0;

		if (cpumask_equal(topology_sibling_cpumask(cpu),
		if (cpumask_equal(cpu_cpu_mask(cpu),
				  policy->related_cpus)) {
			share_cap_level = share_cap_thread;
			share_cap_level = share_cap_die;
			continue;
		}

@@ -170,9 +170,9 @@ int detect_share_cap_flag(void)
			continue;
		}

		if (cpumask_equal(cpu_cpu_mask(cpu),
		if (cpumask_equal(topology_sibling_cpumask(cpu),
				  policy->related_cpus)) {
			share_cap_level = share_cap_die;
			share_cap_level = share_cap_thread;
			continue;
		}
	}
@@ -268,7 +268,7 @@ int topology_smt_flags(void)
	if (asym_cpucap == asym_thread)
		flags |= SD_ASYM_CPUCAPACITY;

	if (share_cap == share_cap_thread)
	if (share_cap >= share_cap_thread)
		flags |= SD_SHARE_CAP_STATES;

	return flags;
@@ -281,7 +281,7 @@ int topology_core_flags(void)
	if (asym_cpucap == asym_core)
		flags |= SD_ASYM_CPUCAPACITY;

	if (share_cap == share_cap_core)
	if (share_cap >= share_cap_core)
		flags |= SD_SHARE_CAP_STATES;

	return flags;
@@ -294,7 +294,7 @@ int topology_cpu_flags(void)
	if (asym_cpucap == asym_die)
		flags |= SD_ASYM_CPUCAPACITY;

	if (share_cap == share_cap_die)
	if (share_cap >= share_cap_die)
		flags |= SD_SHARE_CAP_STATES;

	return flags;
+6 −3
Original line number Diff line number Diff line
@@ -5966,9 +5966,12 @@ static int compute_energy(struct energy_env *eenv)
		 * when we took visit_cpus.
		 */
		sd = rcu_dereference(per_cpu(sd_scs, cpu));
		if (sd && sd->parent)
		if (sd) {
			if (sd->parent)
				sg_shared_cap = sd->parent->groups;

			else /* single cluster system */
				sg_shared_cap = sd->groups;
		}
		for_each_domain(cpu, sd) {
			sg = sd->groups;
			/* Has this sched_domain already been visited? */