On 29.02.16 10:13:48, David Daney wrote:
On 02/29/2016 09:29 AM, Robert Richter wrote:
On 22.02.16 17:58:21, David Daney wrote:
From: Ganapatrao Kulkarni <gkulkarni@xxxxxxxxxxxxxxxxxx>
ADD device tree node parsing for NUMA topology using device
"numa-node-id" property distance-map.
Reviewed-by: Robert Richter <rrichter@xxxxxxxxxx>
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@xxxxxxxxxxxxxxxxxx>
Signed-off-by: David Daney <david.daney@xxxxxxxxxx>
drivers/of/Kconfig | 3 +
drivers/of/Makefile | 1 +
drivers/of/of_numa.c | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/of.h | 9 +++
4 files changed, 224 insertions(+)
create mode 100644 drivers/of/of_numa.c
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index e2a4841..b3bec3a 100644
@@ -112,4 +112,7 @@ config OF_OVERLAY
While this option is selected automatically when needed, you can
enable it manually to improve device tree unit test coverage.
In arch/arm64/Kconfig you now need to:
select OF_NUMA if NUMA && OF
This should depend here on OF and NUMA and enabled in that case. Why
moving that to arch code?
The dependency on of_numa.o is in the architecture specific code, so that is
where the Kconfig select should be too.
If you grep for select in Kconfig files you will see that dependency
checkers in the form of select ... if ... are very rare.
But to avoid arch configs in generic Kconfigs, define HAVE_OF_NUMA,
add it as dependency to OF_NUMA and select it in arch/arm64/Kconfig.
OF_NUMA is then enabled with defbool y if all requirements are met.