From: Reza Arbab Date: Wed, 16 Nov 2016 16:45:03 +0000 (-0600) Subject: powerpc/mm: Allow memory hotplug into an offline node X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a8628d41602dc9f988af051a657eef648eec5c0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/mm: Allow memory hotplug into an offline node Relax the check preventing us from hotplugging into an offline node. This limitation was added in commit 482ec7c403d2 ("[PATCH] powerpc numa: Support sparse online node map") to prevent adding resources to an uninitialized node. These days, there is no harm in doing so. The addition will actually cause the node to be initialized and onlined; add_memory_resource() calls hotadd_new_pgdat() (if necessary) and node_set_online(). Signed-off-by: Reza Arbab Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 51fe1c5b6d71..16267ff8c86c 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1093,7 +1093,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr) nid = hot_add_node_scn_to_nid(scn_addr); } - if (nid < 0 || !node_online(nid)) + if (nid < 0 || !node_possible(nid)) nid = first_online_node; return nid;