[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v2 12/25] ARM: NUMA: Parse CPU NUMA information



Hi,

On 05/10/2017 06:24 AM, Vijay Kilari wrote:
On Mon, May 8, 2017 at 11:01 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
+static int __init dt_numa_scan_cpu_node(const void *fdt, int node,
+                                        const char *name, int depth,
+                                        uint32_t address_cells,
+                                        uint32_t size_cells, void *data)
+{
+    if ( device_tree_type_matches(fdt, node, "cpu") )
+        return dt_numa_process_cpu_node(fdt, node, name, address_cells,
+                                        size_cells);


As said on v1, this code is wrong. CPUs nodes can only be in /cpus and you
cannot rely on the name to be "cpu" (see binding in
Documentation/devicetree/bindings/arm/cpu.txt). The only way to check if it
is a CPU is to look for the property device_type.

The function device_tree_type_matches() isn't looking for device_type?.
Below is dt info on device_type. Anything missing?

                cpu@10101 {
                        compatible = "cavium,thunder", "arm,armv8";
                        device_type = "cpu";
                        ....
                };

You only cover one part of my comment and still miss "CPUS nodes can only be in /cpus".

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.