hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0
--------------------------------
This reverts commit 932afc18ba98772fe428505c76160428f93e7bde.
Fix build error in riscv64: build failed: riscv, allmodconfig
arch/riscv/kernel/smpboot.o: In function `smp_callin': (.text+0x160): undefined reference to `store_cpu_topology' arch/riscv/kernel/smpboot.o: In function `smp_prepare_cpus': (.init.text+0x212): undefined reference to `store_cpu_topology' make: *** [vmlinux] Error 1
Signed-off-by: Jialin Zhang zhangjialin11@huawei.com --- arch/riscv/Kconfig | 2 +- arch/riscv/kernel/smpboot.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index a63d8134a9e5..e52cd2cefe8e 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -36,7 +36,7 @@ config RISCV select CLINT_TIMER if !MMU select COMMON_CLK select EDAC_SUPPORT - select GENERIC_ARCH_TOPOLOGY + select GENERIC_ARCH_TOPOLOGY if SMP select GENERIC_ATOMIC64 if !64BIT select GENERIC_CLOCKEVENTS select GENERIC_EARLY_IOREMAP diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 0e0aed380e28..0b04e0eae3ab 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -46,8 +46,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) int cpuid; int ret;
- store_cpu_topology(smp_processor_id()); - /* This covers non-smp usecase mandated by "nosmp" option */ if (max_cpus == 0) return; @@ -154,8 +152,8 @@ asmlinkage __visible void smp_callin(void) mmgrab(mm); current->active_mm = mm;
- store_cpu_topology(curr_cpuid); notify_cpu_starting(curr_cpuid); + update_siblings_masks(curr_cpuid); set_cpu_online(curr_cpuid, 1);
/*
your patch has been converted to a pull request, pull request link is: https://gitee.com/openeuler/kernel/pulls/818