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

Commit fb586891 authored by Xiaocheng Li's avatar Xiaocheng Li
Browse files

arm: Update cpu_possible_mask according to CPU definition in DT



Since the boot CPU node contains proper data, and all nodes have
a reg property, the DT CPU list can be considered valid and the
cpu_possible_mask initialized in msm_smp_init_cpus() can be
overriden. What's more, the remaining value of default mask
should be cleared in case that the non-existent cores are
included by accident.

Change-Id: I033c42e1f235ac68ea59c7fb27b0067a6c80e16f
Signed-off-by: default avatarXiaocheng Li <lix@codeaurora.org>
parent 8b84a4c0
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -174,10 +174,14 @@ void __init arm_dt_init_cpu_maps(void)
	 * a reg property, the DT CPU list can be considered valid and the
	 * logical map created in smp_setup_processor_id() can be overridden
	 */
	for (i = 0; i < cpuidx; i++) {
	for (i = 0; i < nr_cpu_ids; i++) {
		if (i < cpuidx) {
			set_cpu_possible(i, true);
			cpu_logical_map(i) = tmp_map[i];
			pr_debug("cpu logical map 0x%x\n", cpu_logical_map(i));
		} else {
			set_cpu_possible(i, false);
		}
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -804,11 +804,11 @@ void __init setup_arch(char **cmdline_p)

	unflatten_device_tree();

	arm_dt_init_cpu_maps();
#ifdef CONFIG_SMP
	if (is_smp()) {
		smp_set_ops(mdesc->smp);
		smp_init_cpus();
		arm_dt_init_cpu_maps();
	}
#endif