mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Huacai Chen <chenhc@lemote.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xuefeng Li <lixuefeng@loongson.cn>,
	Youling Tang <tangyouling@loongson.cn>,
	Jinyang He <hejinyang@loongson.cn>
Subject: Re: [PATCH] MIPS: Loongson64: Give chance to build under !CONFIG_NUMA and !CONFIG_SMP
Date: Tue, 29 Dec 2020 17:39:07 +0100	[thread overview]
Message-ID: <20201229163907.GA8519@alpha.franken.de> (raw)
In-Reply-To: <3eb215e2-82ae-2834-2837-55f429027840@loongson.cn>

On Wed, Dec 16, 2020 at 10:44:23AM +0800, Tiezhu Yang wrote:
> I have tested the following three configs on the Loongson platform:
> (1) !NUMA and !SMP,
> (2) !NUMA and SMP,
> (3) NUMA and SMP,
> everything is all right.
> 
> But there exists the following build error under NUMA and !SMP:
> 
>   CC      arch/mips/kernel/asm-offsets.s
> In file included from ./include/linux/gfp.h:9:0,
>                  from ./include/linux/xarray.h:14,
>                  from ./include/linux/radix-tree.h:19,
>                  from ./include/linux/fs.h:15,
>                  from ./include/linux/compat.h:17,
>                  from arch/mips/kernel/asm-offsets.c:12:
> ./include/linux/topology.h: In function ‘numa_node_id’:
> ./include/linux/topology.h:119:2: error: implicit declaration of function
> ‘cpu_logical_map’ [-Werror=implicit-function-declaration]
>   return cpu_to_node(raw_smp_processor_id());
>   ^
> cc1: some warnings being treated as errors
> scripts/Makefile.build:117: recipe for target
> 'arch/mips/kernel/asm-offsets.s' failed
> make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1
> arch/mips/Makefile:396: recipe for target 'archprepare' failed
> make: *** [archprepare] Error 2
> 
> I find a patch to fix this kind of build errors [1], but it seems
> meaningless.
> 
> According to the NUMA and SMP description in arch/mips/Kconfig,
> we will use only one CPU of a multiprocessor machine if !SMP,
> on single node systems leave NUMA disabled.
> 
> So I think there is no need to use NUMA if !SMP, and also we should
> make NUMA depend on SMP to avoid build errors.

ok, but compiling IP27 with your patch gives

WARNING: unmet direct dependencies detected for NUMA
  Depends on [n]: SYS_SUPPORTS_NUMA [=y] && SMP [=n]
  Selected by [y]:
  - SGI_IP27 [=y] && <choice>

WARNING: unmet direct dependencies detected for NUMA
  Depends on [n]: SYS_SUPPORTS_NUMA [=y] && SMP [=n]
  Selected by [y]:
  - SGI_IP27 [=y] && <choice>

WARNING: unmet direct dependencies detected for NUMA
  Depends on [n]: SYS_SUPPORTS_NUMA [=y] && SMP [=n]
  Selected by [y]:
  - SGI_IP27 [=y] && <choice>

If I use "select SMP" instead both ip27 and loongson64 compile.

If you are ok with this change, I'll change it while appling your
patch.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2020-12-29 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 12:32 Tiezhu Yang
2020-12-15 13:21 ` Thomas Bogendoerfer
2020-12-16  2:44   ` Tiezhu Yang
2020-12-29 16:39     ` Thomas Bogendoerfer [this message]
2020-12-30  0:54       ` Tiezhu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201229163907.GA8519@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=chenhc@lemote.com \
    --cc=hejinyang@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=tangyouling@loongson.cn \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome