Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323936 > unrolled thread
| Started by | Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> |
|---|---|
| First post | 2016-02-02 11:20 +0100 |
| Last post | 2016-02-02 13:00 +0100 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH v10 0/8] arm64, numa: Add numa support for arm64 platforms Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> - 2016-02-02 11:20 +0100
[PATCH v10 3/8] dt, numa: adding numa dt binding implementation. Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> - 2016-02-02 11:20 +0100
Re: [PATCH v10 3/8] dt, numa: adding numa dt binding implementation. Rob Herring <robh@kernel.org> - 2016-02-03 00:40 +0100
Re: [PATCH v10 3/8] dt, numa: adding numa dt binding implementation. Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-02-04 12:20 +0100
[PATCH v10 2/8] Documentation, dt, numa: dt bindings for numa. Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> - 2016-02-02 11:20 +0100
Re: [PATCH v10 0/8] arm64, numa: Add numa support for arm64 platforms Robert Richter <robert.richter@caviumnetworks.com> - 2016-02-02 13:00 +0100
| From | Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> |
|---|---|
| Date | 2016-02-02 11:20 +0100 |
| Subject | [PATCH v10 0/8] arm64, numa: Add numa support for arm64 platforms |
| Message-ID | <qXGdY-13U-5@gated-at.bofh.it> |
v10:
- Incorporated review comments from Rob Herring.
- Moved numa binding and implementation to devicetree core.
- Added cleanup patch to remove redundant NODE_DATA macro from asm header files
- Include numa balancing support for arm64 patch in this series.
- Fix tile build issue reported by the kbuild robot(patch 7)
v9: - Added cleanup patch to reuse and avoid redefinition of cpumask_of_pcibus
as suggested from Will Deacon and Bjorn Helgaas.
- Including patch to Make pci-host-generic driver numa aware.
- Incorporated comment from Shannon Zhao.
v8:
- Incorporated review comments of Mark Rutland and Will Deacon.
- Added pci helper function and macro for numa.
v7:
- managing numa memory mapping using memblock.
- Incorporated review comments of Mark Rutland.
v6:
- defined and implemented the numa dt binding using
node property proximity and device node distance-map.
- renamed dt_numa to of_numa
v5:
- created base verion of numa.c which creates dummy numa without using dt
on single socket platforms. Then added patches for dt support.
- Incorporated review comments from Hanjun Guo.
v4:
done changes as per Arnd review comments.
v3:
Added changes to support numa on arm64 based platforms.
Tested these patches on cavium's multinode(2 node topology) platform.
In this patchset, defined and implemented dt bindings for numa mapping
for core and memory using device node property arm,associativity.
v2:
Defined and implemented numa map for memory, cores to node and
proximity distance matrix of nodes.
v1:
Initial patchset to support numa on arm64 platforms.
Note:
1. This patchset is tested for numa with dt on
thunderx single socket and dual socket boards.
2. Numa DT booting needs the dt memory nodes, which are deleted in current efi-stub,
hence to try numa with dt, you need to rebase with ard's patchset.
http://git.linaro.org/people/ard.biesheuvel/linux-arm.git/shortlog/refs/heads/arm64-uefi-early-fdt-handling
3. PATCH[7,8] are not tested for other architectures.
Ganapatrao Kulkarni (8):
arm64, numa: adding numa support for arm64 platforms.
Documentation, dt, numa: dt bindings for numa.
dt, numa: adding numa dt binding implementation.
arm64, numa : Enable numa dt for arm64 platforms.
arm64, dt, thunderx: Add initial dts for Cavium Thunderx in 2 node
topology.
arm64, mm, numa: Adding numa balancing support for arm64.
topology, cleanup: Avoid redefinition of cpumask_of_pcibus in asm
header files.
numa, mm, cleanup: remove redundant NODE_DATA macro from asm header
files.
Documentation/devicetree/bindings/numa.txt | 272 ++++++++
arch/arm64/Kconfig | 26 +
arch/arm64/boot/dts/cavium/Makefile | 2 +-
arch/arm64/boot/dts/cavium/thunder-88xx-2n.dts | 83 +++
arch/arm64/boot/dts/cavium/thunder-88xx-2n.dtsi | 806 ++++++++++++++++++++++++
arch/arm64/include/asm/mmzone.h | 10 +
arch/arm64/include/asm/numa.h | 45 ++
arch/arm64/include/asm/pgtable.h | 18 +
arch/arm64/include/asm/topology.h | 7 +
arch/arm64/kernel/pci.c | 10 +
arch/arm64/kernel/setup.c | 4 +
arch/arm64/kernel/smp.c | 4 +
arch/arm64/mm/Makefile | 1 +
arch/arm64/mm/init.c | 34 +-
arch/arm64/mm/mmu.c | 1 +
arch/arm64/mm/numa.c | 404 ++++++++++++
arch/ia64/include/asm/topology.h | 4 -
arch/m32r/include/asm/mmzone.h | 4 +-
arch/metag/include/asm/mmzone.h | 4 +-
arch/metag/include/asm/topology.h | 3 -
arch/powerpc/include/asm/mmzone.h | 8 +-
arch/powerpc/include/asm/topology.h | 4 -
arch/s390/include/asm/mmzone.h | 6 +-
arch/s390/include/asm/pci.h | 2 +-
arch/s390/include/asm/topology.h | 1 +
arch/sh/include/asm/mmzone.h | 4 +-
arch/sh/include/asm/topology.h | 3 -
arch/sparc/include/asm/mmzone.h | 6 +-
arch/tile/include/asm/pci.h | 2 -
arch/tile/include/asm/topology.h | 3 +
arch/x86/include/asm/mmzone.h | 3 +-
arch/x86/include/asm/mmzone_32.h | 5 -
arch/x86/include/asm/mmzone_64.h | 17 -
arch/x86/include/asm/pci.h | 2 +-
arch/x86/include/asm/topology.h | 1 +
drivers/of/Kconfig | 11 +
drivers/of/Makefile | 1 +
drivers/of/of_numa.c | 207 ++++++
include/asm-generic/mmzone.h | 24 +
include/asm-generic/topology.h | 4 +-
include/linux/of.h | 4 +
41 files changed, 1986 insertions(+), 74 deletions(-)
create mode 100644 Documentation/devicetree/bindings/numa.txt
create mode 100644 arch/arm64/boot/dts/cavium/thunder-88xx-2n.dts
create mode 100644 arch/arm64/boot/dts/cavium/thunder-88xx-2n.dtsi
create mode 100644 arch/arm64/include/asm/mmzone.h
create mode 100644 arch/arm64/include/asm/numa.h
create mode 100644 arch/arm64/mm/numa.c
delete mode 100644 arch/x86/include/asm/mmzone_64.h
create mode 100644 drivers/of/of_numa.c
create mode 100644 include/asm-generic/mmzone.h
--
1.8.1.4
[toc] | [next] | [standalone]
| From | Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> |
|---|---|
| Date | 2016-02-02 11:20 +0100 |
| Subject | [PATCH v10 3/8] dt, numa: adding numa dt binding implementation. |
| Message-ID | <qXGdZ-13U-31@gated-at.bofh.it> |
| In reply to | #1323936 |
dt node parsing for numa topology is done using device property
numa-node-id and device node distance-map.
Reviewed-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
---
drivers/of/Kconfig | 11 +++
drivers/of/Makefile | 1 +
drivers/of/of_numa.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/of.h | 4 +
4 files changed, 223 insertions(+)
create mode 100644 drivers/of/of_numa.c
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index e2a4841..8f9cc3a 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -112,4 +112,15 @@ config OF_OVERLAY
While this option is selected automatically when needed, you can
enable it manually to improve device tree unit test coverage.
+config OF_NUMA
+ bool "Device Tree NUMA support"
+ depends on NUMA
+ depends on OF
+ depends on ARM64
+ default y
+ help
+ Enable Device Tree NUMA support.
+ This enables the numa mapping of cpu, memory, io and
+ inter node distances using dt bindings.
+
endif # OF
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index 156c072..bee3fa9 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -14,5 +14,6 @@ obj-$(CONFIG_OF_MTD) += of_mtd.o
obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
obj-$(CONFIG_OF_RESOLVE) += resolver.o
obj-$(CONFIG_OF_OVERLAY) += overlay.o
+obj-$(CONFIG_OF_NUMA) += of_numa.o
obj-$(CONFIG_OF_UNITTEST) += unittest-data/
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
new file mode 100644
index 0000000..1142cdb
--- /dev/null
+++ b/drivers/of/of_numa.c
@@ -0,0 +1,207 @@
+/*
+ * OF NUMA Parsing support.
+ *
+ * Copyright (C) 2015 Cavium Inc.
+ * Author: Ganapatrao Kulkarni <gkulkarni@cavium.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/of.h>
+#include <linux/of_fdt.h>
+
+/* define default numa node to 0 */
+#define DEFAULT_NODE 0
+
+/* Returns nid in the range [0..MAX_NUMNODES-1],
+ * or NUMA_NO_NODE if no valid numa-node-id entry found
+ * or DEFAULT_NODE if no numa-node-id entry exists
+ */
+static int of_numa_prop_to_nid(const __be32 *of_numa_prop, int length)
+{
+ int nid;
+
+ if (!of_numa_prop)
+ return DEFAULT_NODE;
+
+ if (length != sizeof(*of_numa_prop)) {
+ pr_warn("NUMA: Invalid of_numa_prop length %d found.\n",
+ length);
+ return NUMA_NO_NODE;
+ }
+
+ nid = of_read_number(of_numa_prop, 1);
+ if (nid >= MAX_NUMNODES) {
+ pr_warn("NUMA: Invalid numa node %d found.\n", nid);
+ return NUMA_NO_NODE;
+ }
+
+ return nid;
+}
+
+static int __init early_init_of_node_to_nid(unsigned long node)
+{
+ int length;
+ const __be32 *of_numa_prop;
+
+ of_numa_prop = of_get_flat_dt_prop(node, "numa-node-id", &length);
+
+ return of_numa_prop_to_nid(of_numa_prop, length);
+}
+
+/*
+ * Even though we connect cpus to numa domains later in SMP
+ * init, we need to know the node ids now for all cpus.
+*/
+static int __init early_init_parse_cpu_node(unsigned long node)
+{
+ int nid;
+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
+
+ if (type == NULL)
+ return 0;
+
+ if (strcmp(type, "cpu") != 0)
+ return 0;
+
+ nid = early_init_of_node_to_nid(node);
+ if (nid == NUMA_NO_NODE)
+ return -EINVAL;
+
+ node_set(nid, numa_nodes_parsed);
+ return 0;
+}
+
+static int __init early_init_parse_memory_node(unsigned long node)
+{
+ const __be32 *reg, *endp;
+ int length;
+ int nid;
+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
+
+ if (type == NULL)
+ return 0;
+
+ if (strcmp(type, "memory") != 0)
+ return 0;
+
+ nid = early_init_of_node_to_nid(node);
+ if (nid == NUMA_NO_NODE)
+ return -EINVAL;
+
+ reg = of_get_flat_dt_prop(node, "reg", &length);
+ endp = reg + (length / sizeof(__be32));
+
+ while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
+ u64 base, size;
+
+ base = dt_mem_next_cell(dt_root_addr_cells, ®);
+ size = dt_mem_next_cell(dt_root_size_cells, ®);
+ pr_debug("NUMA: base = %llx , node = %u\n",
+ base, nid);
+
+ if (numa_add_memblk(nid, base, size) < 0)
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int __init early_init_parse_distance_map_v1(unsigned long node,
+ const char *uname)
+{
+ const __be32 *prop_dist_matrix;
+ int length = 0, i, matrix_count;
+ int nr_size_cells = OF_ROOT_NODE_SIZE_CELLS_DEFAULT;
+
+ pr_info("NUMA: parsing numa-distance-map-v1\n");
+
+ prop_dist_matrix =
+ of_get_flat_dt_prop(node, "distance-matrix", &length);
+
+ if (!length) {
+ pr_err("NUMA: failed to parse distance-matrix\n");
+ return -ENODEV;
+ }
+
+ matrix_count = ((length / sizeof(__be32)) / (3 * nr_size_cells));
+
+ if ((matrix_count * sizeof(__be32) * 3 * nr_size_cells) != length) {
+ pr_warn("NUMA: invalid distance-matrix length %d\n", length);
+ return -EINVAL;
+ }
+
+ for (i = 0; i < matrix_count; i++) {
+ u32 nodea, nodeb, distance;
+
+ nodea = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
+ nodeb = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
+ distance = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
+ numa_set_distance(nodea, nodeb, distance);
+ pr_debug("NUMA: distance[node%d -> node%d] = %d\n",
+ nodea, nodeb, distance);
+
+ /* Set default distance of node B->A same as A->B */
+ if (nodeb > nodea)
+ numa_set_distance(nodeb, nodea, distance);
+ }
+
+ return 0;
+}
+
+static int __init early_init_parse_distance_map(unsigned long node,
+ const char *uname)
+{
+ if (strcmp(uname, "distance-map") != 0)
+ return 0;
+
+ if (of_flat_dt_is_compatible(node, "numa-distance-map-v1"))
+ return early_init_parse_distance_map_v1(node, uname);
+
+ pr_err("NUMA: invalid distance-map device node\n");
+ return -EINVAL;
+}
+
+static int __init early_init_of_scan_numa_map(unsigned long node, const char *uname,
+ int depth, void *data)
+{
+ int ret;
+
+ ret = early_init_parse_cpu_node(node);
+ if (ret)
+ return ret;
+
+ ret = early_init_parse_memory_node(node);
+ if (ret)
+ return ret;
+
+ return early_init_parse_distance_map(node, uname);
+}
+
+int of_node_to_nid(struct device_node *device)
+{
+ const __be32 *of_numa_prop;
+ int length;
+
+ of_numa_prop = of_get_property(device, "numa-node-id", &length);
+ if (of_numa_prop)
+ return of_numa_prop_to_nid(of_numa_prop, length);
+
+ return NUMA_NO_NODE;
+}
+
+/* DT node mapping is done already early_init_of_scan_memory */
+int __init of_numa_init(void)
+{
+ return of_scan_flat_dt(early_init_of_scan_numa_map, NULL);
+}
diff --git a/include/linux/of.h b/include/linux/of.h
index dd10626..23e5bad 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -685,6 +685,10 @@ static inline int of_node_to_nid(struct device_node *device)
}
#endif
+#ifdef CONFIG_OF_NUMA
+extern int __init of_numa_init(void);
+#endif
+
static inline struct device_node *of_find_matching_node(
struct device_node *from,
const struct of_device_id *matches)
--
1.8.1.4
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-02-03 00:40 +0100 |
| Subject | Re: [PATCH v10 3/8] dt, numa: adding numa dt binding implementation. |
| Message-ID | <qXSIa-29S-27@gated-at.bofh.it> |
| In reply to | #1323938 |
On Tue, Feb 02, 2016 at 03:39:18PM +0530, Ganapatrao Kulkarni wrote:
> dt node parsing for numa topology is done using device property
> numa-node-id and device node distance-map.
>
> Reviewed-by: Robert Richter <rrichter@cavium.com>
> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> ---
> drivers/of/Kconfig | 11 +++
> drivers/of/Makefile | 1 +
> drivers/of/of_numa.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/of.h | 4 +
> 4 files changed, 223 insertions(+)
> create mode 100644 drivers/of/of_numa.c
>
> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
> index e2a4841..8f9cc3a 100644
> --- a/drivers/of/Kconfig
> +++ b/drivers/of/Kconfig
> @@ -112,4 +112,15 @@ config OF_OVERLAY
> While this option is selected automatically when needed, you can
> enable it manually to improve device tree unit test coverage.
>
> +config OF_NUMA
> + bool "Device Tree NUMA support"
Does this need to be user visible?
> + depends on NUMA
> + depends on OF
> + depends on ARM64
drop this (and make sure it compiles on other arches). It will fail
because you also have a dependency on FDT.
> + default y
> + help
> + Enable Device Tree NUMA support.
> + This enables the numa mapping of cpu, memory, io and
> + inter node distances using dt bindings.
> +
> endif # OF
> diff --git a/drivers/of/Makefile b/drivers/of/Makefile
> index 156c072..bee3fa9 100644
> --- a/drivers/of/Makefile
> +++ b/drivers/of/Makefile
> @@ -14,5 +14,6 @@ obj-$(CONFIG_OF_MTD) += of_mtd.o
> obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
> obj-$(CONFIG_OF_RESOLVE) += resolver.o
> obj-$(CONFIG_OF_OVERLAY) += overlay.o
> +obj-$(CONFIG_OF_NUMA) += of_numa.o
>
> obj-$(CONFIG_OF_UNITTEST) += unittest-data/
> diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
> new file mode 100644
> index 0000000..1142cdb
> --- /dev/null
> +++ b/drivers/of/of_numa.c
> @@ -0,0 +1,207 @@
> +/*
> + * OF NUMA Parsing support.
> + *
> + * Copyright (C) 2015 Cavium Inc.
> + * Author: Ganapatrao Kulkarni <gkulkarni@cavium.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <linux/of.h>
> +#include <linux/of_fdt.h>
Surely you need some numa related includes.
> +
> +/* define default numa node to 0 */
> +#define DEFAULT_NODE 0
> +
> +/* Returns nid in the range [0..MAX_NUMNODES-1],
> + * or NUMA_NO_NODE if no valid numa-node-id entry found
> + * or DEFAULT_NODE if no numa-node-id entry exists
> + */
> +static int of_numa_prop_to_nid(const __be32 *of_numa_prop, int length)
> +{
> + int nid;
> +
> + if (!of_numa_prop)
> + return DEFAULT_NODE;
> +
> + if (length != sizeof(*of_numa_prop)) {
> + pr_warn("NUMA: Invalid of_numa_prop length %d found.\n",
> + length);
> + return NUMA_NO_NODE;
> + }
> +
> + nid = of_read_number(of_numa_prop, 1);
> + if (nid >= MAX_NUMNODES) {
> + pr_warn("NUMA: Invalid numa node %d found.\n", nid);
> + return NUMA_NO_NODE;
> + }
> +
> + return nid;
> +}
> +
> +static int __init early_init_of_node_to_nid(unsigned long node)
> +{
> + int length;
> + const __be32 *of_numa_prop;
> +
> + of_numa_prop = of_get_flat_dt_prop(node, "numa-node-id", &length);
> +
> + return of_numa_prop_to_nid(of_numa_prop, length);
> +}
> +
> +/*
> + * Even though we connect cpus to numa domains later in SMP
> + * init, we need to know the node ids now for all cpus.
> +*/
> +static int __init early_init_parse_cpu_node(unsigned long node)
> +{
> + int nid;
> + const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
> +
> + if (type == NULL)
> + return 0;
> +
> + if (strcmp(type, "cpu") != 0)
> + return 0;
> +
> + nid = early_init_of_node_to_nid(node);
> + if (nid == NUMA_NO_NODE)
> + return -EINVAL;
> +
> + node_set(nid, numa_nodes_parsed);
> + return 0;
> +}
> +
> +static int __init early_init_parse_memory_node(unsigned long node)
> +{
> + const __be32 *reg, *endp;
> + int length;
> + int nid;
> + const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
> +
> + if (type == NULL)
> + return 0;
> +
> + if (strcmp(type, "memory") != 0)
> + return 0;
> +
> + nid = early_init_of_node_to_nid(node);
> + if (nid == NUMA_NO_NODE)
> + return -EINVAL;
> +
> + reg = of_get_flat_dt_prop(node, "reg", &length);
> + endp = reg + (length / sizeof(__be32));
> +
> + while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
> + u64 base, size;
> +
> + base = dt_mem_next_cell(dt_root_addr_cells, ®);
> + size = dt_mem_next_cell(dt_root_size_cells, ®);
> + pr_debug("NUMA: base = %llx , node = %u\n",
> + base, nid);
> +
We already have code to parse memory nodes. Can the NUMA part be
combined somehow.
> + if (numa_add_memblk(nid, base, size) < 0)
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +
> +static int __init early_init_parse_distance_map_v1(unsigned long node,
> + const char *uname)
> +{
> + const __be32 *prop_dist_matrix;
> + int length = 0, i, matrix_count;
> + int nr_size_cells = OF_ROOT_NODE_SIZE_CELLS_DEFAULT;
> +
> + pr_info("NUMA: parsing numa-distance-map-v1\n");
> +
> + prop_dist_matrix =
> + of_get_flat_dt_prop(node, "distance-matrix", &length);
> +
> + if (!length) {
> + pr_err("NUMA: failed to parse distance-matrix\n");
> + return -ENODEV;
> + }
> +
> + matrix_count = ((length / sizeof(__be32)) / (3 * nr_size_cells));
> +
> + if ((matrix_count * sizeof(__be32) * 3 * nr_size_cells) != length) {
> + pr_warn("NUMA: invalid distance-matrix length %d\n", length);
> + return -EINVAL;
> + }
> +
> + for (i = 0; i < matrix_count; i++) {
> + u32 nodea, nodeb, distance;
> +
> + nodea = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
> + nodeb = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
> + distance = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
> + numa_set_distance(nodea, nodeb, distance);
> + pr_debug("NUMA: distance[node%d -> node%d] = %d\n",
> + nodea, nodeb, distance);
> +
> + /* Set default distance of node B->A same as A->B */
> + if (nodeb > nodea)
> + numa_set_distance(nodeb, nodea, distance);
> + }
> +
> + return 0;
> +}
> +
> +static int __init early_init_parse_distance_map(unsigned long node,
> + const char *uname)
> +{
> + if (strcmp(uname, "distance-map") != 0)
> + return 0;
> +
> + if (of_flat_dt_is_compatible(node, "numa-distance-map-v1"))
> + return early_init_parse_distance_map_v1(node, uname);
> +
> + pr_err("NUMA: invalid distance-map device node\n");
> + return -EINVAL;
> +}
> +
> +static int __init early_init_of_scan_numa_map(unsigned long node, const char *uname,
> + int depth, void *data)
> +{
> + int ret;
> +
> + ret = early_init_parse_cpu_node(node);
> + if (ret)
> + return ret;
> +
> + ret = early_init_parse_memory_node(node);
> + if (ret)
> + return ret;
> +
> + return early_init_parse_distance_map(node, uname);
> +}
> +
> +int of_node_to_nid(struct device_node *device)
> +{
> + const __be32 *of_numa_prop;
> + int length;
> +
> + of_numa_prop = of_get_property(device, "numa-node-id", &length);
> + if (of_numa_prop)
> + return of_numa_prop_to_nid(of_numa_prop, length);
> +
> + return NUMA_NO_NODE;
> +}
> +
> +/* DT node mapping is done already early_init_of_scan_memory */
> +int __init of_numa_init(void)
> +{
> + return of_scan_flat_dt(early_init_of_scan_numa_map, NULL);
> +}
> diff --git a/include/linux/of.h b/include/linux/of.h
> index dd10626..23e5bad 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -685,6 +685,10 @@ static inline int of_node_to_nid(struct device_node *device)
> }
> #endif
>
> +#ifdef CONFIG_OF_NUMA
> +extern int __init of_numa_init(void);
> +#endif
You don't need an ifdef here unless you need an empty function.
Can this be called internally by the DT code when it does the all
the other flat scanning instead of adding another call from arch code to
DT code. Ideally, the arch code would call DT code once and it would do
all the parsing it needs to.
Rob
[toc] | [prev] | [next] | [standalone]
| From | Ganapatrao Kulkarni <gpkulkarni@gmail.com> |
|---|---|
| Date | 2016-02-04 12:20 +0100 |
| Subject | Re: [PATCH v10 3/8] dt, numa: adding numa dt binding implementation. |
| Message-ID | <qYq78-7RC-21@gated-at.bofh.it> |
| In reply to | #1324741 |
Hi Rob,
On Wed, Feb 3, 2016 at 5:04 AM, Rob Herring <robh@kernel.org> wrote:
> On Tue, Feb 02, 2016 at 03:39:18PM +0530, Ganapatrao Kulkarni wrote:
>> dt node parsing for numa topology is done using device property
>> numa-node-id and device node distance-map.
>>
>> Reviewed-by: Robert Richter <rrichter@cavium.com>
>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> ---
>> drivers/of/Kconfig | 11 +++
>> drivers/of/Makefile | 1 +
>> drivers/of/of_numa.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++
>> include/linux/of.h | 4 +
>> 4 files changed, 223 insertions(+)
>> create mode 100644 drivers/of/of_numa.c
>>
>> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
>> index e2a4841..8f9cc3a 100644
>> --- a/drivers/of/Kconfig
>> +++ b/drivers/of/Kconfig
>> @@ -112,4 +112,15 @@ config OF_OVERLAY
>> While this option is selected automatically when needed, you can
>> enable it manually to improve device tree unit test coverage.
>>
>> +config OF_NUMA
>> + bool "Device Tree NUMA support"
>
> Does this need to be user visible?
thanks, not required, arch can select
>
>> + depends on NUMA
>> + depends on OF
>> + depends on ARM64
>
> drop this (and make sure it compiles on other arches). It will fail
> because you also have a dependency on FDT.
thanks will add OF_EARLY_FLATTREE
>
>> + default y
>> + help
>> + Enable Device Tree NUMA support.
>> + This enables the numa mapping of cpu, memory, io and
>> + inter node distances using dt bindings.
>> +
>> endif # OF
>> diff --git a/drivers/of/Makefile b/drivers/of/Makefile
>> index 156c072..bee3fa9 100644
>> --- a/drivers/of/Makefile
>> +++ b/drivers/of/Makefile
>> @@ -14,5 +14,6 @@ obj-$(CONFIG_OF_MTD) += of_mtd.o
>> obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
>> obj-$(CONFIG_OF_RESOLVE) += resolver.o
>> obj-$(CONFIG_OF_OVERLAY) += overlay.o
>> +obj-$(CONFIG_OF_NUMA) += of_numa.o
>>
>> obj-$(CONFIG_OF_UNITTEST) += unittest-data/
>> diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
>> new file mode 100644
>> index 0000000..1142cdb
>> --- /dev/null
>> +++ b/drivers/of/of_numa.c
>> @@ -0,0 +1,207 @@
>> +/*
>> + * OF NUMA Parsing support.
>> + *
>> + * Copyright (C) 2015 Cavium Inc.
>> + * Author: Ganapatrao Kulkarni <gkulkarni@cavium.com>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program. If not, see <http://www.gnu.org/licenses/>.
>> + */
>> +
>> +#include <linux/of.h>
>> +#include <linux/of_fdt.h>
>
> Surely you need some numa related includes.
ok
>
>> +
>> +/* define default numa node to 0 */
>> +#define DEFAULT_NODE 0
>> +
>> +/* Returns nid in the range [0..MAX_NUMNODES-1],
>> + * or NUMA_NO_NODE if no valid numa-node-id entry found
>> + * or DEFAULT_NODE if no numa-node-id entry exists
>> + */
>> +static int of_numa_prop_to_nid(const __be32 *of_numa_prop, int length)
>> +{
>> + int nid;
>> +
>> + if (!of_numa_prop)
>> + return DEFAULT_NODE;
>> +
>> + if (length != sizeof(*of_numa_prop)) {
>> + pr_warn("NUMA: Invalid of_numa_prop length %d found.\n",
>> + length);
>> + return NUMA_NO_NODE;
>> + }
>> +
>> + nid = of_read_number(of_numa_prop, 1);
>> + if (nid >= MAX_NUMNODES) {
>> + pr_warn("NUMA: Invalid numa node %d found.\n", nid);
>> + return NUMA_NO_NODE;
>> + }
>> +
>> + return nid;
>> +}
>> +
>> +static int __init early_init_of_node_to_nid(unsigned long node)
>> +{
>> + int length;
>> + const __be32 *of_numa_prop;
>> +
>> + of_numa_prop = of_get_flat_dt_prop(node, "numa-node-id", &length);
>> +
>> + return of_numa_prop_to_nid(of_numa_prop, length);
>> +}
>> +
>> +/*
>> + * Even though we connect cpus to numa domains later in SMP
>> + * init, we need to know the node ids now for all cpus.
>> +*/
>> +static int __init early_init_parse_cpu_node(unsigned long node)
>> +{
>> + int nid;
>> + const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
>> +
>> + if (type == NULL)
>> + return 0;
>> +
>> + if (strcmp(type, "cpu") != 0)
>> + return 0;
>> +
>> + nid = early_init_of_node_to_nid(node);
>> + if (nid == NUMA_NO_NODE)
>> + return -EINVAL;
>> +
>> + node_set(nid, numa_nodes_parsed);
>> + return 0;
>> +}
>> +
>> +static int __init early_init_parse_memory_node(unsigned long node)
>> +{
>> + const __be32 *reg, *endp;
>> + int length;
>> + int nid;
>> + const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
>> +
>> + if (type == NULL)
>> + return 0;
>> +
>> + if (strcmp(type, "memory") != 0)
>> + return 0;
>> +
>> + nid = early_init_of_node_to_nid(node);
>> + if (nid == NUMA_NO_NODE)
>> + return -EINVAL;
>> +
>> + reg = of_get_flat_dt_prop(node, "reg", &length);
>> + endp = reg + (length / sizeof(__be32));
>> +
>> + while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
>> + u64 base, size;
>> +
>> + base = dt_mem_next_cell(dt_root_addr_cells, ®);
>> + size = dt_mem_next_cell(dt_root_size_cells, ®);
>> + pr_debug("NUMA: base = %llx , node = %u\n",
>> + base, nid);
>> +
>
> We already have code to parse memory nodes. Can the NUMA part be
> combined somehow.
it is too early to parse numa in core code since there are no
variables ready to hold parsed information.
which is done in numa_init()
>
>> + if (numa_add_memblk(nid, base, size) < 0)
>> + return -EINVAL;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int __init early_init_parse_distance_map_v1(unsigned long node,
>> + const char *uname)
>> +{
>> + const __be32 *prop_dist_matrix;
>> + int length = 0, i, matrix_count;
>> + int nr_size_cells = OF_ROOT_NODE_SIZE_CELLS_DEFAULT;
>> +
>> + pr_info("NUMA: parsing numa-distance-map-v1\n");
>> +
>> + prop_dist_matrix =
>> + of_get_flat_dt_prop(node, "distance-matrix", &length);
>> +
>> + if (!length) {
>> + pr_err("NUMA: failed to parse distance-matrix\n");
>> + return -ENODEV;
>> + }
>> +
>> + matrix_count = ((length / sizeof(__be32)) / (3 * nr_size_cells));
>> +
>> + if ((matrix_count * sizeof(__be32) * 3 * nr_size_cells) != length) {
>> + pr_warn("NUMA: invalid distance-matrix length %d\n", length);
>> + return -EINVAL;
>> + }
>> +
>> + for (i = 0; i < matrix_count; i++) {
>> + u32 nodea, nodeb, distance;
>> +
>> + nodea = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
>> + nodeb = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
>> + distance = dt_mem_next_cell(nr_size_cells, &prop_dist_matrix);
>> + numa_set_distance(nodea, nodeb, distance);
>> + pr_debug("NUMA: distance[node%d -> node%d] = %d\n",
>> + nodea, nodeb, distance);
>> +
>> + /* Set default distance of node B->A same as A->B */
>> + if (nodeb > nodea)
>> + numa_set_distance(nodeb, nodea, distance);
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int __init early_init_parse_distance_map(unsigned long node,
>> + const char *uname)
>> +{
>> + if (strcmp(uname, "distance-map") != 0)
>> + return 0;
>> +
>> + if (of_flat_dt_is_compatible(node, "numa-distance-map-v1"))
>> + return early_init_parse_distance_map_v1(node, uname);
>> +
>> + pr_err("NUMA: invalid distance-map device node\n");
>> + return -EINVAL;
>> +}
>> +
>> +static int __init early_init_of_scan_numa_map(unsigned long node, const char *uname,
>> + int depth, void *data)
>> +{
>> + int ret;
>> +
>> + ret = early_init_parse_cpu_node(node);
>> + if (ret)
>> + return ret;
>> +
>> + ret = early_init_parse_memory_node(node);
>> + if (ret)
>> + return ret;
>> +
>> + return early_init_parse_distance_map(node, uname);
>> +}
>> +
>> +int of_node_to_nid(struct device_node *device)
>> +{
>> + const __be32 *of_numa_prop;
>> + int length;
>> +
>> + of_numa_prop = of_get_property(device, "numa-node-id", &length);
>> + if (of_numa_prop)
>> + return of_numa_prop_to_nid(of_numa_prop, length);
>> +
>> + return NUMA_NO_NODE;
>> +}
>> +
>> +/* DT node mapping is done already early_init_of_scan_memory */
>> +int __init of_numa_init(void)
>> +{
>> + return of_scan_flat_dt(early_init_of_scan_numa_map, NULL);
>> +}
>> diff --git a/include/linux/of.h b/include/linux/of.h
>> index dd10626..23e5bad 100644
>> --- a/include/linux/of.h
>> +++ b/include/linux/of.h
>> @@ -685,6 +685,10 @@ static inline int of_node_to_nid(struct device_node *device)
>> }
>> #endif
>>
>> +#ifdef CONFIG_OF_NUMA
>> +extern int __init of_numa_init(void);
>> +#endif
>
> You don't need an ifdef here unless you need an empty function.
>
> Can this be called internally by the DT code when it does the all
> the other flat scanning instead of adding another call from arch code to
> DT code. Ideally, the arch code would call DT code once and it would do
> all the parsing it needs to.
It is too early to include numa related dt parsing in the core dt
parsing like early_init_dt_scan()
since, numa init is called in bootmem_init after some mmblk related
variables are set.
which is little late in sequence to setup_machine_fdt
of_numa_init is called through numa_init, after required variables are
initialized.
In current implementation, the dt scan for numa parsing like memory
node, cpus and distance map
happens after the required data structures are initialized, moving this parsing
to core dt parsing will make this implementation in to 2 levels and
makes it complex,
which is at present fairly simple and straightforward.
>
> Rob
thanks
Ganapat
[toc] | [prev] | [next] | [standalone]
| From | Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> |
|---|---|
| Date | 2016-02-02 11:20 +0100 |
| Subject | [PATCH v10 2/8] Documentation, dt, numa: dt bindings for numa. |
| Message-ID | <qXGdZ-13U-39@gated-at.bofh.it> |
| In reply to | #1323936 |
DT bindings for numa mapping of memory, cores and IOs.
Reviewed-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
---
Documentation/devicetree/bindings/numa.txt | 272 +++++++++++++++++++++++++++++
1 file changed, 272 insertions(+)
create mode 100644 Documentation/devicetree/bindings/numa.txt
diff --git a/Documentation/devicetree/bindings/numa.txt b/Documentation/devicetree/bindings/numa.txt
new file mode 100644
index 0000000..ec5ed7c
--- /dev/null
+++ b/Documentation/devicetree/bindings/numa.txt
@@ -0,0 +1,272 @@
+==============================================================================
+NUMA binding description.
+==============================================================================
+
+==============================================================================
+1 - Introduction
+==============================================================================
+
+Systems employing a Non Uniform Memory Access (NUMA) architecture contain
+collections of hardware resources including processors, memory, and I/O buses,
+that comprise what is commonly known as a NUMA node.
+Processor accesses to memory within the local NUMA node is generally faster
+than processor accesses to memory outside of the local NUMA node.
+DT defines interfaces that allow the platform to convey NUMA node
+topology information to OS.
+
+==============================================================================
+2 - numa-node-id
+==============================================================================
+
+For the purpose of identification, each NUMA node is associated with a unique
+token known as a node id. For the purpose of this binding
+a node id is a 32-bit integer.
+
+A device node is associated with a NUMA node by the presence of a
+numa-node-id property which contains the node id of the device.
+
+Example:
+ /* numa node 0 */
+ numa-node-id = <0>;
+
+ /* numa node 1 */
+ numa-node-id = <1>;
+
+==============================================================================
+3 - distance-map
+==============================================================================
+
+The device tree node distance-map describes the relative
+distance (memory latency) between all numa nodes.
+
+- compatible : Should at least contain "numa-distance-map-v1".
+
+- distance-matrix
+ This property defines a matrix to describe the relative distances
+ between all numa nodes.
+ It is represented as a list of node pairs and their relative distance.
+
+ Note:
+ 1. Each entry represents distance from first node to second node.
+ The distances are equal in either direction.
+ 2. The distance from a node to self (local distance) is represented
+ with value 10 and all internode distance should be represented with
+ a value greater than 10.
+ 3. distance-matrix should have entries in lexicographical ascending
+ order of nodes.
+ 4. There must be only one device node distance-map which must reside in the root node.
+
+Example:
+ 4 nodes connected in mesh/ring topology as below,
+
+ 0_______20______1
+ | |
+ | |
+ 20 20
+ | |
+ | |
+ |_______________|
+ 3 20 2
+
+ if relative distance for each hop is 20,
+ then internode distance would be,
+ 0 -> 1 = 20
+ 1 -> 2 = 20
+ 2 -> 3 = 20
+ 3 -> 0 = 20
+ 0 -> 2 = 40
+ 1 -> 3 = 40
+
+ and dt presentation for this distance matrix is,
+
+ distance-map {
+ compatible = "numa-distance-map-v1";
+ distance-matrix = <0 0 10>,
+ <0 1 20>,
+ <0 2 40>,
+ <0 3 20>,
+ <1 0 20>,
+ <1 1 10>,
+ <1 2 20>,
+ <1 3 40>,
+ <2 0 40>,
+ <2 1 20>,
+ <2 2 10>,
+ <2 3 20>,
+ <3 0 20>,
+ <3 1 40>,
+ <3 2 20>,
+ <3 3 10>;
+ };
+
+==============================================================================
+4 - Example dts
+==============================================================================
+
+Dual socket system consists of 2 boards connected through ccn bus and
+each board having one socket/soc of 8 cpus, memory and pci bus.
+
+ memory@c00000 {
+ device_type = "memory";
+ reg = <0x0 0xc00000 0x0 0x80000000>;
+ /* node 0 */
+ numa-node-id = <0>;
+ };
+
+ memory@10000000000 {
+ device_type = "memory";
+ reg = <0x100 0x0 0x0 0x80000000>;
+ /* node 1 */
+ numa-node-id = <1>;
+ };
+
+ cpus {
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ /* node 0 */
+ numa-node-id = <0>;
+ };
+ cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x1>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@2 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x2>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@3 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x3>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@4 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x4>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@5 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x5>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@6 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x6>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@7 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x7>;
+ enable-method = "psci";
+ numa-node-id = <0>;
+ };
+ cpu@8 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x8>;
+ enable-method = "psci";
+ /* node 1 */
+ numa-node-id = <1>;
+ };
+ cpu@9 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x9>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ cpu@a {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0xa>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ cpu@b {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0xb>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ cpu@c {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0xc>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ cpu@d {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0xd>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ cpu@e {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0xe>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ cpu@f {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0xf>;
+ enable-method = "psci";
+ numa-node-id = <1>;
+ };
+ };
+
+ pcie0: pcie0@848000000000 {
+ compatible = "arm,armv8";
+ device_type = "pci";
+ bus-range = <0 255>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <0x8480 0x00000000 0 0x10000000>; /* Configuration space */
+ ranges = <0x03000000 0x8010 0x00000000 0x8010 0x00000000 0x70 0x00000000>;
+ /* node 0 */
+ numa-node-id = <0>;
+ };
+
+ pcie1: pcie1@948000000000 {
+ compatible = "arm,armv8";
+ device_type = "pci";
+ bus-range = <0 255>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ reg = <0x9480 0x00000000 0 0x10000000>; /* Configuration space */
+ ranges = <0x03000000 0x9010 0x00000000 0x9010 0x00000000 0x70 0x00000000>;
+ /* node 1 */
+ numa-node-id = <1>;
+ };
+
+ distance-map {
+ compatible = "numa-distance-map-v1";
+ distance-matrix = <0 0 10>,
+ <0 1 20>,
+ <1 1 10>;
+ };
--
1.8.1.4
[toc] | [prev] | [next] | [standalone]
| From | Robert Richter <robert.richter@caviumnetworks.com> |
|---|---|
| Date | 2016-02-02 13:00 +0100 |
| Message-ID | <qXHMK-2fP-11@gated-at.bofh.it> |
| In reply to | #1323936 |
On 02.02.16 15:39:15, Ganapatrao Kulkarni wrote: > Ganapatrao Kulkarni (8): > arm64, numa: adding numa support for arm64 platforms. > Documentation, dt, numa: dt bindings for numa. > dt, numa: adding numa dt binding implementation. > arm64, numa : Enable numa dt for arm64 platforms. > arm64, dt, thunderx: Add initial dts for Cavium Thunderx in 2 node > topology. > arm64, mm, numa: Adding numa balancing support for arm64. > topology, cleanup: Avoid redefinition of cpumask_of_pcibus in asm > header files. > numa, mm, cleanup: remove redundant NODE_DATA macro from asm header > files. I have tested the whole series on single and dual node systems for devicetree and acpi (with Hanjun's acpi numa v3 patches ported on top). Tested-by: Robert Richter <rrichter@cavium.com> -Robert > > Documentation/devicetree/bindings/numa.txt | 272 ++++++++ > arch/arm64/Kconfig | 26 + > arch/arm64/boot/dts/cavium/Makefile | 2 +- > arch/arm64/boot/dts/cavium/thunder-88xx-2n.dts | 83 +++ > arch/arm64/boot/dts/cavium/thunder-88xx-2n.dtsi | 806 ++++++++++++++++++++++++ > arch/arm64/include/asm/mmzone.h | 10 + > arch/arm64/include/asm/numa.h | 45 ++ > arch/arm64/include/asm/pgtable.h | 18 + > arch/arm64/include/asm/topology.h | 7 + > arch/arm64/kernel/pci.c | 10 + > arch/arm64/kernel/setup.c | 4 + > arch/arm64/kernel/smp.c | 4 + > arch/arm64/mm/Makefile | 1 + > arch/arm64/mm/init.c | 34 +- > arch/arm64/mm/mmu.c | 1 + > arch/arm64/mm/numa.c | 404 ++++++++++++ > arch/ia64/include/asm/topology.h | 4 - > arch/m32r/include/asm/mmzone.h | 4 +- > arch/metag/include/asm/mmzone.h | 4 +- > arch/metag/include/asm/topology.h | 3 - > arch/powerpc/include/asm/mmzone.h | 8 +- > arch/powerpc/include/asm/topology.h | 4 - > arch/s390/include/asm/mmzone.h | 6 +- > arch/s390/include/asm/pci.h | 2 +- > arch/s390/include/asm/topology.h | 1 + > arch/sh/include/asm/mmzone.h | 4 +- > arch/sh/include/asm/topology.h | 3 - > arch/sparc/include/asm/mmzone.h | 6 +- > arch/tile/include/asm/pci.h | 2 - > arch/tile/include/asm/topology.h | 3 + > arch/x86/include/asm/mmzone.h | 3 +- > arch/x86/include/asm/mmzone_32.h | 5 - > arch/x86/include/asm/mmzone_64.h | 17 - > arch/x86/include/asm/pci.h | 2 +- > arch/x86/include/asm/topology.h | 1 + > drivers/of/Kconfig | 11 + > drivers/of/Makefile | 1 + > drivers/of/of_numa.c | 207 ++++++ > include/asm-generic/mmzone.h | 24 + > include/asm-generic/topology.h | 4 +- > include/linux/of.h | 4 + > 41 files changed, 1986 insertions(+), 74 deletions(-) > create mode 100644 Documentation/devicetree/bindings/numa.txt > create mode 100644 arch/arm64/boot/dts/cavium/thunder-88xx-2n.dts > create mode 100644 arch/arm64/boot/dts/cavium/thunder-88xx-2n.dtsi > create mode 100644 arch/arm64/include/asm/mmzone.h > create mode 100644 arch/arm64/include/asm/numa.h > create mode 100644 arch/arm64/mm/numa.c > delete mode 100644 arch/x86/include/asm/mmzone_64.h > create mode 100644 drivers/of/of_numa.c > create mode 100644 include/asm-generic/mmzone.h > > -- > 1.8.1.4 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web