[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1477284149-2976-3-git-send-email-khandual@linux.vnet.ibm.com>
Date: Mon, 24 Oct 2016 10:12:21 +0530
From: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: mhocko@...e.com, js1304@...il.com, vbabka@...e.cz, mgorman@...e.de,
minchan@...nel.org, akpm@...ux-foundation.org,
aneesh.kumar@...ux.vnet.ibm.com, bsingharora@...il.com
Subject: [DEBUG 02/10] powerpc/mm: Create numa nodes for hotplug memory
From: Reza Arbab <arbab@...ux.vnet.ibm.com>
When scanning the device tree to initialize the system NUMA topology,
process dt elements with compatible id "ibm,hotplug-aperture" to create
memoryless numa nodes.
These nodes will be filled when hotplug occurs within the associated
address range.
Signed-off-by: Reza Arbab <arbab@...ux.vnet.ibm.com>
Signed-off-by: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
---
arch/powerpc/mm/numa.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index a51c188..42fcc8e 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -708,6 +708,12 @@ static void __init parse_drconf_memory(struct device_node *memory)
}
}
+static const struct of_device_id memory_match[] = {
+ { .type = "memory" },
+ { .compatible = "ibm,hotplug-aperture" },
+ { /* sentinel */ }
+};
+
static int __init parse_numa_properties(void)
{
struct device_node *memory;
@@ -752,7 +758,7 @@ static int __init parse_numa_properties(void)
get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
- for_each_node_by_type(memory, "memory") {
+ for_each_matching_node(memory, memory_match) {
unsigned long start;
unsigned long size;
int nid;
@@ -1044,7 +1050,7 @@ static int hot_add_node_scn_to_nid(unsigned long scn_addr)
struct device_node *memory;
int nid = -1;
- for_each_node_by_type(memory, "memory") {
+ for_each_matching_node(memory, memory_match) {
unsigned long start, size;
int ranges;
const __be32 *memcell_buf;
--
2.1.0
Powered by blists - more mailing lists