On Thu, Dec 03, 2020 at 08:32:52PM +0800, Tiezhu Yang wrote: > In the current code, we can not build under !CONFIG_NUMA and !CONFIG_SMP > on the Loongson64 platform, it seems bad for the users who just want to > use pure single core (not nosmp) to debug, so do the following things to > give them a chance: > > (1) Do not select NUMA and SMP for MACH_LOONGSON64 in Kconfig, make NUMA > depends on SMP, and then just set them in the loongson3_defconfig. > (2) Move szmem() from numa.c to init.c and add prom_init_memory() under > !CONFIG_NUMA. > (3) Clean up szmem() due to the statements of case SYSTEM_RAM_LOW and > SYSTEM_RAM_HIGH are the same. > (4) Remove the useless declaration of prom_init_memory() and add the > declaration of szmem() in loongson.h to avoid build error. > > Signed-off-by: Youling Tang <tangyouling@xxxxxxxxxxx> > Signed-off-by: Jinyang He <hejinyang@xxxxxxxxxxx> > Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> > --- > arch/mips/Kconfig | 3 +- > arch/mips/configs/loongson3_defconfig | 2 + > arch/mips/include/asm/mach-loongson64/loongson.h | 2 +- > arch/mips/loongson64/init.c | 49 ++++++++++++++++++++++ > arch/mips/loongson64/numa.c | 52 +----------------------- > 5 files changed, 54 insertions(+), 54 deletions(-) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index 44a47ad..2034c66 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -490,8 +490,6 @@ config MACH_LOONGSON64 > select SYS_SUPPORTS_ZBOOT > select SYS_SUPPORTS_RELOCATABLE > select ZONE_DMA32 > - select NUMA > - select SMP > select COMMON_CLK > select USE_OF > select BUILTIN_DTB > @@ -2755,6 +2753,7 @@ config ARCH_SPARSEMEM_ENABLE > config NUMA > bool "NUMA Support" > depends on SYS_SUPPORTS_NUMA > + depends on SMP can you solve your problem without this hunk ? I don't want to make NUMA depeding on SMP. NUMA just selects memory archtitecture. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]