Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762307Ab3ECAH7 (ORCPT ); Thu, 2 May 2013 20:07:59 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:42299 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760561Ab3ECABo (ORCPT ); Thu, 2 May 2013 20:01:44 -0400 From: Cody P Schafer To: Linux MM Cc: LKML , Cody P Schafer , Simon Jeons Subject: [RFC PATCH v3 26/31] x86/mm/numa: when dnuma is enabled, use memlayout to handle memory hotplug's physaddr_to_nid. Date: Thu, 2 May 2013 17:00:58 -0700 Message-Id: <1367539263-19999-27-git-send-email-cody@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.2.2 In-Reply-To: <1367539263-19999-1-git-send-email-cody@linux.vnet.ibm.com> References: <1367539263-19999-1-git-send-email-cody@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13050300-3620-0000-0000-0000024F5478 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1229 Lines: 38 When a memlayout is tracked (ie: CONFIG_DYNAMIC_NUMA is enabled), rather than iterate over numa_meminfo, a lookup can be done using memlayout. Signed-off-by: Cody P Schafer --- arch/x86/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 75819ef..f1609c0 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -28,7 +28,7 @@ struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; EXPORT_SYMBOL(node_data); static struct numa_meminfo numa_meminfo -#ifndef CONFIG_MEMORY_HOTPLUG +#if !defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_DYNAMIC_NUMA) __initdata #endif ; @@ -832,7 +832,7 @@ EXPORT_SYMBOL(cpumask_of_node); #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */ -#ifdef CONFIG_MEMORY_HOTPLUG +#if defined(CONFIG_MEMORY_HOTPLUG) && !defined(CONFIG_DYNAMIC_NUMA) int memory_add_physaddr_to_nid(u64 start) { struct numa_meminfo *mi = &numa_meminfo; -- 1.8.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/