Hi Jan, > -----Original Message----- > From: Jan Beulich <jbeul...@suse.com> > Sent: 2023年1月12日 16:11 > To: Wei Chen <wei.c...@arm.com> > Cc: nd <n...@arm.com>; Stefano Stabellini <sstabell...@kernel.org>; Julien > Grall <jul...@xen.org>; Bertrand Marquis <bertrand.marq...@arm.com>; > Volodymyr Babchuk <volodymyr_babc...@epam.com>; Andrew Cooper > <andrew.coop...@citrix.com>; George Dunlap <george.dun...@citrix.com>; Wei > Liu <w...@xen.org>; Roger Pau Monné <roger....@citrix.com>; xen- > de...@lists.xenproject.org > Subject: Re: [PATCH v2 03/17] xen/arm: implement node distance helpers for > Arm > > On 12.01.2023 07:31, Wei Chen wrote: > >> -----Original Message----- > >> From: Jan Beulich <jbeul...@suse.com> > >> Sent: 2023年1月11日 0:47 > >> > >> On 10.01.2023 09:49, Wei Chen wrote: > >>> --- a/xen/arch/arm/include/asm/numa.h > >>> +++ b/xen/arch/arm/include/asm/numa.h > >>> @@ -28,6 +28,20 @@ enum dt_numa_status { > >>> DT_NUMA_OFF, > >>> }; > >>> > >>> +/* > >>> + * In ACPI spec, 0-9 are the reserved values for node distance, > >>> + * 10 indicates local node distance, 20 indicates remote node > >>> + * distance. Set node distance map in device tree will follow > >>> + * the ACPI's definition. > >>> + */ > >>> +#define NUMA_DISTANCE_UDF_MIN 0 > >>> +#define NUMA_DISTANCE_UDF_MAX 9 > >>> +#define NUMA_LOCAL_DISTANCE 10 > >>> +#define NUMA_REMOTE_DISTANCE 20 > >> > >> In the absence of a caller of numa_set_distance() it is entirely > unclear > >> whether this tying to ACPI used values is actually appropriate. > >> > > > > From Kernel's NUMA device tree binding, it seems DT NUMA are reusing > > ACPI used values for distances [1]. > > I can't find any mention of ACPI in that doc, so the example values used > there matching ACPI's may also be coincidental. In no event can a Linux > kernel doc serve as DT specification. If values are to match ACPI's, I > expect a DT spec to actually say so. >
Unfortunately, the latest device tree spec doesn't have any NUMA description [1]. But if we define different values for DT NUMA in Xen, we may have an incompatible with Linux DT. [1] https://github.com/devicetree-org/devicetree-specification/releases/download/v0.4-rc1/devicetree-specification-v0.4-rc1.pdf Cheers, Wei Chen > Jan