Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965371AbcJXT74 (ORCPT ); Mon, 24 Oct 2016 15:59:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41922 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938945AbcJXT7O (ORCPT ); Mon, 24 Oct 2016 15:59:14 -0400 From: Reza Arbab To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Andrew Morton Cc: Bharata B Rao , Nathan Fontenot , Stewart Smith , Alistair Popple , Balbir Singh , "Aneesh Kumar K.V" , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Subject: [PATCH v5 1/3] powerpc/mm: allow memory hotplug into a memoryless node Date: Mon, 24 Oct 2016 14:58:07 -0500 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1477339089-5455-1-git-send-email-arbab@linux.vnet.ibm.com> References: <1477339089-5455-1-git-send-email-arbab@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102419-0008-0000-0000-000005E34A1D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005972; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000187; SDB=6.00772199; UDB=6.00370617; IPR=6.00549016; BA=6.00004826; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013092; XFM=3.00000011; UTC=2016-10-24 19:58:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102419-0009-0000-0000-00003C67E69B Message-Id: <1477339089-5455-2-git-send-email-arbab@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-24_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610240346 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1417 Lines: 48 Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-off-by: Reza Arbab Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh Cc: Nathan Fontenot Cc: Bharata B Rao --- 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 a51c188..0cb6bd8 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1085,7 +1085,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; @@ -1101,17 +1101,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