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. Jan