lkml.org 
[lkml]   [2020]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/6] mm/memory_hotplug: introduce default dummy memory_add_physaddr_to_nid()
From
Date
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@arm.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@redhat.com>

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-07-09 11:11    [W:0.106 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site