[PATCH OLK-6.6] locking/qspinlock: Fix CNA NUMA node setup before numa_store_cpu_info()

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

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/18371 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/P2K... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/18371 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/P2K...
participants (2)
-
Jiacheng Yu
-
patchwork bot