of, numa: Add NUMA of binding implementation.

Add device tree parsing for NUMA topology using device
"numa-node-id" property in distance-map and cpu nodes.

This is a complete rewrite of a previous patch by:
   Ganapatrao Kulkarni<gkulkarni@caviumnetworks.com>

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
David Daney
2016-04-08 15:50:25 -07:00
committed by Will Deacon
parent 2bc4da1d2b
commit 298535c00a
4 changed files with 224 additions and 0 deletions

View File

@@ -685,6 +685,15 @@ static inline int of_node_to_nid(struct device_node *device)
}
#endif
#ifdef CONFIG_OF_NUMA
extern int of_numa_init(void);
#else
static inline int of_numa_init(void)
{
return -ENOSYS;
}
#endif
static inline struct device_node *of_find_matching_node(
struct device_node *from,
const struct of_device_id *matches)