Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp124758pxa; Wed, 26 Aug 2020 19:33:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyR0pE92r1ozfGvP3FTn4+yytuqVOxw8Ezn3qF+aMd3RnsVlpy7s8Wcs7ZNyzdf1WCtwhr X-Received: by 2002:a50:da44:: with SMTP id a4mr18305477edk.36.1598495632996; Wed, 26 Aug 2020 19:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598495632; cv=none; d=google.com; s=arc-20160816; b=CkWcbS3J5IdJM33YS5EpDlUs9/2Vv0a2ruApW+DtXWP/mTXIvz+w3WaAS5WnMXk97P gPZ4wi1KqOeByz1LqBkguOOAuB2VVZS2oJrLsCOIfXxj81Zuu5ifMBlR/faC0A9zNtGa 1SS83BHDPO55UZv+7bDvMvfGQG8WVgKdOyXQRixD878GnI9RvA262SRw41wygP13yQyX 0fTWtb+GuWkNb0XKuESSa0oSiYDI9fycezaFi7/ybh/T/6tvvxa3s7q2pfAG2QUYvKs6 7ALDZMX2cfY8XxdZJ+Z7fUNPMDT9MP1M5/LLu74T4PCvFLK0SkPIEIt5oLlLdZMybomG 4qLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=ELk37LgLcqtvFWygOBVT+oT1dxoaKJovd5r/Ok1EoL8=; b=mh3BrRwkxc8r+2OGs/WxbtoO2o6ygWua8bBef8si6yXwtYDwh04lfwrH5AGYbrEtg+ eRwYKK8vD/eep4jqA6cEqFsT1cO8r++FojzT57zBuyFRNVXznBmSPBCO+1U1QAfWKpTe yiHeGoq9qTYD088Gm6AB6ImF01ZvCjcso5xvXBDqeSBe6LPGA2xIq1nobs6wUNVHbQmn Z//ZEzilsALaMP92z61LKeZ6cRHxxWUCe/PMw0PTCdFCtB/LC0wqyBxPwF+2IYUeN1Nv tortCz88ZyyUDsYkzU+SsuLZtZXLUHteXMo1lF+tX8zUnZYmP37bK1u3ltB1KLptmicw UxVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si427101ejg.50.2020.08.26.19.33.11; Wed, 26 Aug 2020 19:33:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbgH0Cb5 (ORCPT + 99 others); Wed, 26 Aug 2020 22:31:57 -0400 Received: from mail.loongson.cn ([114.242.206.163]:45328 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726826AbgH0Cb5 (ORCPT ); Wed, 26 Aug 2020 22:31:57 -0400 Received: from [10.130.0.60] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxj9wFG0dfEnYOAA--.427S3; Thu, 27 Aug 2020 10:31:35 +0800 (CST) Subject: Re: [PATCH] MIPS: Loongson: Fix complie errors without CONFIG_SMP To: Matthew Wilcox References: <1598446407-8845-1-git-send-email-hejinyang@loongson.cn> <20200826130122.GR17456@casper.infradead.org> Cc: Huacai Chen , Jiaxun Yang , Andrew Morton , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Tiezhu Yang , Xuefeng Li From: hejinyang Message-ID: <5394f030-104c-f191-e581-4f1ed23a85a6@loongson.cn> Date: Thu, 27 Aug 2020 10:31:33 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20200826130122.GR17456@casper.infradead.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9Dxj9wFG0dfEnYOAA--.427S3 X-Coremail-Antispam: 1UD129KBjvdXoW7Xw43tr43uF18Ww1kGr47twb_yoW3ZwcEgw 4Du3W8JF13XFyvgFZFg3y8Zr4qgF4UWasrGw1rur12934Yqr95XayktrZxuFn8u3y5XrZ7 WF4S9FyFvanavjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbx8FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr 1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv 7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCYjI0SjxkI62AI1cAE 67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrV AFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCI c40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267 AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWU JVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHU DUUUUU= X-CM-SenderInfo: pkhmx0p1dqwqxorr0wxvrqhubq/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/26/2020 09:01 PM, Matthew Wilcox wrote: > On Wed, Aug 26, 2020 at 08:53:27PM +0800, Jinyang He wrote: >> +++ b/arch/mips/include/asm/mach-loongson64/topology.h >> @@ -4,7 +4,11 @@ >> >> #ifdef CONFIG_NUMA >> >> +#ifdef CONFIG_SMP >> #define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2) >> +#else >> +#define cpu_to_node(cpu) 0 >> +#endif > Are you saying you've enabled NUMA without enabling SMP? Does that make > sense? NUMA option normally work with more than two nodes, though Loongson64 use it default after patch 6fbde6b492dfc761ad60a68fb2cb32b1eb05b786. Loongson64(3A)'s each node consists of 4 cpus while it only has 4 cpus. In other words, it has only one node while open NUMA. I'm confused it if NUMA deponds on SMP. I'll try fix it with unabling NUMA and SMP later. Thanks.:-)