Remove the check which prevents us from hotplugging into an empty node.

This limitation has been questioned before [1], and judging by the
response, there doesn't seem to be a reason we can't remove it. No issues
have been found in light testing.

[1] 
http://lkml.kernel.org/r/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com
    http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com

Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com>
Acked-by: Balbir Singh <bsinghar...@gmail.com>
Cc: Nathan Fontenot <nf...@linux.vnet.ibm.com>
Cc: Bharata B Rao <bhar...@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 75b9cd6..d7ac419 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1121,7 +1121,7 @@ static int hot_add_node_scn_to_nid(unsigned long scn_addr)
 int hot_add_scn_to_nid(unsigned long scn_addr)
 {
        struct device_node *memory = NULL;
-       int nid, found = 0;
+       int nid;
 
        if (!numa_enabled || (min_common_depth < 0))
                return first_online_node;
@@ -1137,17 +1137,6 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
        if (nid < 0 || !node_online(nid))
                nid = first_online_node;
 
-       if (NODE_DATA(nid)->node_spanned_pages)
-               return nid;
-
-       for_each_online_node(nid) {
-               if (NODE_DATA(nid)->node_spanned_pages) {
-                       found = 1;
-                       break;
-               }
-       }
-
-       BUG_ON(!found);
        return nid;
 }
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to