[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1479824388-30446-6-git-send-email-khandual@linux.vnet.ibm.com>
Date: Tue, 22 Nov 2016 19:49:41 +0530
From: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: mhocko@...e.com, vbabka@...e.cz, mgorman@...e.de,
minchan@...nel.org, aneesh.kumar@...ux.vnet.ibm.com,
bsingharora@...il.com, srikar@...ux.vnet.ibm.com,
haren@...ux.vnet.ibm.com, jglisse@...hat.com, dave.hansen@...el.com
Subject: [DEBUG 05/12] powerpc/mm: Identify coherent device memory nodes during platform init
Coherent device memory nodes will have "ibm,hotplug-aperture" as one of the
compatible properties in their respective device nodes in the device tree.
Detect them early during NUMA platform initialization and mark them as such
in the node_to_phys_device_map[] array which in turn is used to support the
arch_check_cdm_node() function for the core VM.
Signed-off-by: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
---
arch/powerpc/mm/numa.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 31efc27..b625e0e 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -41,10 +41,12 @@
#include <asm/setup.h>
#include <asm/vdso.h>
+static int node_to_phys_device_map[MAX_NUMNODES];
+
#ifdef CONFIG_COHERENT_DEVICE
int arch_check_node_cdm(int nid)
{
- return 0;
+ return node_to_phys_device_map[nid];
}
#endif
@@ -790,6 +792,9 @@ static int __init parse_numa_properties(void)
if (nid < 0)
nid = default_nid;
+ if (of_device_is_compatible(memory, "ibm,hotplug-aperture"))
+ node_to_phys_device_map[nid] = 1;
+
fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
node_set_online(nid);
--
1.8.3.1
Powered by blists - more mailing lists