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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 1CA11C433E0 for ; Fri, 10 Jul 2020 03:18:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9D332072E for ; Fri, 10 Jul 2020 03:18:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YPaXDJJg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9D332072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=B7pzeX/m1WmJ/7NXNcY7HRWAU9Zgi0ePmoQr/KkijUY=; b=YPaXDJJgJro9oP9vEh8GY1Z0b0 CRRHsVsazbhYaxuoPNObrGvkZFWzizSF801EDn26B7K36559ynto2hWDVTLBlzhTNhuHWUtwaOzhh a55FIcDGxUX8+PZfnogDBpN2CkEztLeh3u4MOgbYcW1x2zpOyitgsPOBtI3Hnd0IltQJX4QkwDzBV qKtj58d7Tkh5SURhHIwqSNiC72qUqvPNniUP0ke2mMJzjLVbwO0egKYALx8EFJz4X/+E5q9kPpQtb HYuc5ilU54RLPZ3dZ9n2G/ILADlW7UqxhD70fmXsfAXfMHpWMdrCV+epDnkLafd9sKkSyqRVnCtcD 1fh0jqbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtjWn-0000Cu-Qf; Fri, 10 Jul 2020 03:16:45 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtjWl-0000C4-IA for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 03:16:44 +0000 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 E923831B; Thu, 9 Jul 2020 20:16:37 -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 A22283F9AB; Thu, 9 Jul 2020 20:16:28 -0700 (PDT) From: Jia He To: Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Yoshinori Sato , Rich Felker , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , David Hildenbrand Subject: [PATCH v4 0/2] Fix and enable pmem as RAM device on arm64 Date: Fri, 10 Jul 2020 11:16:17 +0800 Message-Id: <20200710031619.18762-1-justin.he@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200709_231643_646927_2DFCFFC4 X-CRM114-Status: GOOD ( 14.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kaly Xin , Michal Hocko , Dave Jiang , Baoquan He , linux-sh@vger.kernel.org, Vishal Verma , Masahiro Yamada , x86@kernel.org, Chuhong Yuan , linux-kernel@vger.kernel.org, Mike Rapoport , linux-mm@kvack.org, linux-nvdimm@lists.01.org, Jonathan Cameron , "H. Peter Anvin" , linux-ia64@vger.kernel.org, Dan Williams , Logan Gunthorpe , Andrew Morton , linux-arm-kernel@lists.infradead.org, Jia He MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This fixies a few issues when I tried to enable pmem as RAM device on arm64. To use memory_add_physaddr_to_nid as a fallback nid, it would be better implement a general version (__weak) in mm/memory_hotplug. After that, arm64/ sh/s390 can simply use the general version, and PowerPC/ia64/x86 will use arch specific version. Tested on ThunderX2 host/qemu "-M virt" guest with a nvdimm device. The memblocks from the dax pmem device can be either hot-added or hot-removed on arm64 guest. Also passed the compilation test on x86. Changes: v4: - remove "device-dax: use fallback nid when numa_node is invalid", wait for Dan Williams' phys_addr_to_target_node() patch - folder v3 patch1-4 into single one, no functional changes v3: https://lkml.org/lkml/2020/7/8/1541 - introduce general version memory_add_physaddr_to_nid, refine the arch specific one - fix an uninitialization bug in v2 device-dax patch v2: https://lkml.org/lkml/2020/7/7/71 - Drop unnecessary patch to harden try_offline_node - Use new solution(by David) to fix dev->target_node=-1 during probing - Refine the mem_hotplug_begin/done patch v1: https://lkml.org/lkml/2020/7/5/381 Jia He (2): mm/memory_hotplug: introduce default dummy memory_add_physaddr_to_nid() mm/memory_hotplug: fix unpaired mem_hotplug_begin/done arch/arm64/mm/numa.c | 10 ---------- arch/ia64/mm/numa.c | 2 -- arch/sh/mm/init.c | 9 --------- arch/x86/mm/numa.c | 1 - mm/memory_hotplug.c | 15 ++++++++++++--- 5 files changed, 12 insertions(+), 25 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel