Commit bb2c1f34 authored by Mao Minkai's avatar Mao Minkai Committed by guzitao
Browse files

sw64: store topology and numa info by each cpu itself

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



--------------------------------

Let the boot cpu calculate and store the topology and numa info of a
non-boot cpu after it is booted could cause some data issue. Now the
non-boot cpu will calculate and store its own topology and numa info
during initialization process.

Signed-off-by: default avatarMao Minkai <maominkai@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 3f90ac70
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -102,6 +102,8 @@ void smp_callin(void)

	per_cpu(cpu_state, cpuid) = CPU_ONLINE;
	per_cpu(hard_node_id, cpuid) = rcid_to_domain_id(cpu_to_rcid(cpuid));
	store_cpu_topology(cpuid);
	numa_add_cpu(cpuid);

	/* Must have completely accurate bogos.  */
	local_irq_enable();
@@ -149,8 +151,6 @@ static int secondary_cpu_start(int cpuid, struct task_struct *idle)
	return -1;

started:
	store_cpu_topology(cpuid);
	numa_add_cpu(cpuid);
	return 0;
}