From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 259F4C433E0 for ; Tue, 29 Dec 2020 16:40:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8F2120867 for ; Tue, 29 Dec 2020 16:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726214AbgL2QkJ (ORCPT ); Tue, 29 Dec 2020 11:40:09 -0500 Received: from elvis.franken.de ([193.175.24.41]:45176 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgL2QkI (ORCPT ); Tue, 29 Dec 2020 11:40:08 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1kuI1p-0007OT-00; Tue, 29 Dec 2020 17:39:21 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 9CCF2C07BF; Tue, 29 Dec 2020 17:39:07 +0100 (CET) Date: Tue, 29 Dec 2020 17:39:07 +0100 From: Thomas Bogendoerfer To: Tiezhu Yang Cc: Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Youling Tang , Jinyang He Subject: Re: [PATCH] MIPS: Loongson64: Give chance to build under !CONFIG_NUMA and !CONFIG_SMP Message-ID: <20201229163907.GA8519@alpha.franken.de> References: <1606998772-5904-1-git-send-email-yangtiezhu@loongson.cn> <20201215132123.GA9201@alpha.franken.de> <3eb215e2-82ae-2834-2837-55f429027840@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3eb215e2-82ae-2834-2837-55f429027840@loongson.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] && WARNING: unmet direct dependencies detected for NUMA Depends on [n]: SYS_SUPPORTS_NUMA [=y] && SMP [=n] Selected by [y]: - SGI_IP27 [=y] && WARNING: unmet direct dependencies detected for NUMA Depends on [n]: SYS_SUPPORTS_NUMA [=y] && SMP [=n] Selected by [y]: - SGI_IP27 [=y] && 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 ]