|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN RFC PATCH 22/40] xen/arm: introduce a helper to parse device tree processor node
Hi Wei, On 11/08/2021 11:24, Wei Chen wrote: Processor NUMA ID information is stored in device tree's processor node as "numa-node-id". We need a new helper to parse this ID from processor node. If we get this ID from processor node, this ID's validity still need to be checked. Once we got a invalid NUMA ID from any processor node, the device tree will be marked as NUMA information invalid. Signed-off-by: Wei Chen <wei.chen@xxxxxxx> --- xen/arch/arm/numa_device_tree.c | 41 +++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/numa_device_tree.c b/xen/arch/arm/numa_device_tree.c index 1c74ad135d..37cc56acf3 100644 --- a/xen/arch/arm/numa_device_tree.c +++ b/xen/arch/arm/numa_device_tree.c @@ -20,16 +20,53 @@ #include <xen/init.h> #include <xen/nodemask.h> #include <xen/numa.h> +#include <xen/device_tree.h> +#include <asm/setup.h>s8 device_tree_numa = 0;+static nodemask_t processor_nodes_parsed __initdata;-int srat_disabled(void) You seem to have a mix of soft and hard tab in this file. Is there a lot of the code that was directly copied from Linux? If not, then the file should be using Xen coding style. + } + + node_set(node, processor_nodes_parsed); + + device_tree_numa = 1; + printk(KERN_INFO "DT: NUMA node %u processor parsed\n", node); + + return 0; +} + +/* Parse CPU NUMA node info */ +int __init device_tree_parse_numa_cpu_node(const void *fdt, int node) AFAICT, you are going to turn this helper static in a follow-up patch. This is a bad practice. Instead, the function should be static from the beginning. If it is not possible, then you should re-order the code. In this case, I think you can add the boilerplate to parse the NUMA information (patch #25) here and then extend it in each patch. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |