
Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICXU74 ---------------------------------------- CNA currently sets up per-CPU NUMA nodes from start_kernel(), when the CPU to node mapping is not yet valid. This can lead to incorrect node ids being stored in CNA structures. Defer the initialization to late_initcall(), after SMP and NUMA setup has completed. This ensures that cpu_to_node() returns the correct ids before CNA is enabled. Fixes: 2dfbfabfced8 ("locking/qspinlock: Add CNA support for ARM64 without pvspinlock") Signed-off-by: Jiacheng Yu <yujiacheng3@huawei.com> --- kernel/locking/qspinlock_cna.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/locking/qspinlock_cna.h b/kernel/locking/qspinlock_cna.h index b4951b7a5930..f1b06ff771f9 100644 --- a/kernel/locking/qspinlock_cna.h +++ b/kernel/locking/qspinlock_cna.h @@ -142,6 +142,8 @@ static int __init cna_init_nodes(void) return 0; } +late_initcall(cna_init_nodes); + static __always_inline void cna_init_node(struct mcs_spinlock *node) { bool priority = !in_task() || irqs_disabled() || rt_task(current); -- 2.43.0