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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 6F263C433E1 for ; Thu, 27 Aug 2020 03:12:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 34AB82076C for ; Thu, 27 Aug 2020 03:12:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YpT/6OF/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34AB82076C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A681A6B0002; Wed, 26 Aug 2020 23:12:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A18456B0003; Wed, 26 Aug 2020 23:12:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92D5B6B0006; Wed, 26 Aug 2020 23:12:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 7EC836B0002 for ; Wed, 26 Aug 2020 23:12:34 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2F886181AEF1F for ; Thu, 27 Aug 2020 03:12:34 +0000 (UTC) X-FDA: 77194875828.30.kitty69_4201c7327069 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id F0451180B3AA7 for ; Thu, 27 Aug 2020 03:12:33 +0000 (UTC) X-HE-Tag: kitty69_4201c7327069 X-Filterd-Recvd-Size: 3234 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Thu, 27 Aug 2020 03:12:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xeNavqw5VrEUhK1uC5SznmQUTraq5Hr4BCCsMByRsaI=; b=YpT/6OF/Gpyyb1tY7UT8DwNc0I tFI/88DFWeXSQmA721mD00+5P8ucXGbX9dP60A+99p1JQPchNJh1Xq9kPw7LRbJwt3hiWzmTKz/KH dws/BCGIKixIhx17rIDQv0MWEbrxnbUXmyNZcDpw2eD/+78PYE2z0gp9K0mVRT5KUevIistUUAP0I 6caaYXd9pcpPBoDi4/MQ+1mmaa8XYNMQw/MaXcYFKKOiW2K7xwTVECPjpqqxwOOngzrL5GEUT3GFr dGeIDdBreF/qwOahd84rmbAi6wqIaXQxvBGAzJbuKgiMdIfu8ahGG/eumx1Bvw3jDTBpxH0XSLrwe /mK/z8fQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kB8Km-0001jN-Il; Thu, 27 Aug 2020 03:12:16 +0000 Date: Thu, 27 Aug 2020 04:12:16 +0100 From: Matthew Wilcox To: hejinyang 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 Subject: Re: [PATCH] MIPS: Loongson: Fix complie errors without CONFIG_SMP Message-ID: <20200827031216.GB14765@casper.infradead.org> References: <1598446407-8845-1-git-send-email-hejinyang@loongson.cn> <20200826130122.GR17456@casper.infradead.org> <5394f030-104c-f191-e581-4f1ed23a85a6@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5394f030-104c-f191-e581-4f1ed23a85a6@loongson.cn> X-Rspamd-Queue-Id: F0451180B3AA7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Aug 27, 2020 at 10:31:33AM +0800, hejinyang wrote: > > > 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. mips: config NUMA bool "NUMA Support" depends on SYS_SUPPORTS_NUMA x86: config NUMA bool "NUMA Memory Allocation and Scheduler Support" depends on SMP If you had a good reason for enabling NUMA without enabling SMP (CPU-less memory nodes?), that'd be an interesting discussion to have. Since your hardware seems to have SMP by default, I'd suggest just adding the missing 'depends'.