From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Date: Thu, 09 Jul 2020 09:10:13 +0000 Subject: Re: [PATCH v3 1/6] mm/memory_hotplug: introduce default dummy memory_add_physaddr_to_nid() Message-Id: <884d57cc-20ef-af2c-dd33-8e9dec4759de@redhat.com> List-Id: References: <20200709020629.91671-1-justin.he@arm.com> <20200709020629.91671-2-justin.he@arm.com> In-Reply-To: <20200709020629.91671-2-justin.he@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jia He , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Yoshinori Sato , Rich Felker , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov 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 On 09.07.20 04:06, Jia He wrote: > This is to introduce a general dummy helper. memory_add_physaddr_to_nid() > is a fallback option to get the nid in case NUMA_NO_NID is detected. > > After this patch, arm64/sh/s390 can simply use the general dummy version. > PowerPC/x86/ia64 will still use their specific version. > > Signed-off-by: Jia He > --- > mm/memory_hotplug.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index da374cd3d45b..b49ab743d914 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -350,6 +350,16 @@ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, > return err; > } > > +#ifdef CONFIG_NUMA > +int __weak memory_add_physaddr_to_nid(u64 start) > +{ > + pr_info_once("Unknown target node for memory at 0x%llx, assuming node 0\n", > + start); > + return 0; > +} > +EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); > +#endif > + > /* find the smallest valid pfn in the range [start_pfn, end_pfn) */ > static unsigned long find_smallest_section_pfn(int nid, struct zone *zone, > unsigned long start_pfn, > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb