From patchwork Mon Jul 6 01:19:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia He X-Patchwork-Id: 11644797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A5AC739 for ; Mon, 6 Jul 2020 01:20:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC18C20715 for ; Mon, 6 Jul 2020 01:20:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC18C20715 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 00CEC6B0005; Sun, 5 Jul 2020 21:20:09 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F01B36B0006; Sun, 5 Jul 2020 21:20:08 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DECAF6B0007; Sun, 5 Jul 2020 21:20:08 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id C8ABD6B0005 for ; Sun, 5 Jul 2020 21:20:08 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8AFB42C8F for ; Mon, 6 Jul 2020 01:20:08 +0000 (UTC) X-FDA: 77005894896.28.knee73_120af8026ea7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 655ED6C2C for ; Mon, 6 Jul 2020 01:20:08 +0000 (UTC) X-Spam-Summary: 1,0,0,58cafa4b591c4178,d41d8cd98f00b204,justin.he@arm.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1345:1359:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:4250:4321:4361:5007:6261:7903:8634:10004:11026:11473:11658:11914:12296:12297:12438:12555:12679:12895:12986:13069:13311:13357:14181:14384:14394:14721:21063:21080:21451:21627:21990:30054:30080,0,RBL:217.140.110.172:@arm.com:.lbl8.mailshell.net-64.100.201.201 62.2.0.100;04y85qqje9gqb4sttnquyo4s8y9bnyc373z1mr9mpmaxeqw18f5xn7aqugtz68t.nbcbggem7o3j5eum4g9ti39kmstz9bid4gbo4xoxcogi99id8zocppw1sjwpwsd.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: knee73_120af8026ea7 X-Filterd-Recvd-Size: 2445 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Jul 2020 01:20:08 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 76057C0A; Sun, 5 Jul 2020 18:20:07 -0700 (PDT) Received: from localhost.localdomain (entos-thunderx2-02.shanghai.arm.com [10.169.212.213]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 111313F718; Sun, 5 Jul 2020 18:20:03 -0700 (PDT) From: Jia He To: Catalin Marinas , Will Deacon Cc: Andrew Morton , Mike Rapoport , Baoquan He , Chuhong Yuan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Kaly Xin , Jia He Subject: [PATCH 1/3] arm64/numa: set numa_off to false when numa node is fake Date: Mon, 6 Jul 2020 09:19:45 +0800 Message-Id: <20200706011947.184166-2-justin.he@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706011947.184166-1-justin.he@arm.com> References: <20200706011947.184166-1-justin.he@arm.com> X-Rspamd-Queue-Id: 655ED6C2C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Previously, numa_off is set to true unconditionally in dummy_numa_init(), even if there is a fake numa node. But acpi will translate node id to NUMA_NO_NODE(-1) in acpi_map_pxm_to_node() because it regards numa_off as turning off the numa node. Without this patch, pmem can't be probed as a RAM device on arm64 if SRAT table isn't present. $ndctl create-namespace -fe namespace0.0 --mode=devdax --map=dev -s 1g -a 64K kmem dax0.0: rejecting DAX region [mem 0x240400000-0x2bfffffff] with invalid node: -1 kmem: probe of dax0.0 failed with error -22 This fixes it by setting numa_off to false. Signed-off-by: Jia He --- arch/arm64/mm/numa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index aafcee3e3f7e..7689986020d9 100644 --- a/arch/arm64/mm/numa.c +++ b/arch/arm64/mm/numa.c @@ -440,7 +440,8 @@ static int __init dummy_numa_init(void) return ret; } - numa_off = true; + /* force numa_off to be false since we have a fake numa node here */ + numa_off = false; return 0; }