[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <884d57cc-20ef-af2c-dd33-8e9dec4759de@redhat.com>
Date: Thu, 9 Jul 2020 11:10:13 +0200
From: David Hildenbrand <david@...hat.com>
To: Jia He <justin.he@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>
Cc: x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Dan Williams <dan.j.williams@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>,
Chuhong Yuan <hslester96@...il.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Logan Gunthorpe <logang@...tatee.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Hocko <mhocko@...e.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-ia64@...r.kernel.org, linux-sh@...r.kernel.org,
linux-nvdimm@...ts.01.org, linux-mm@...ck.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Kaly Xin <Kaly.Xin@....com>
Subject: Re: [PATCH v3 1/6] mm/memory_hotplug: introduce default dummy
memory_add_physaddr_to_nid()
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 <justin.he@....com>
> ---
> 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 <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists