Re: [PATCH v3 05/12] arm64, acpi, numa: NUMA support based on SRAT and SLIT

From: Robert Richter
Date: Mon Jan 25 2016 - 05:22:16 EST


On 23.01.16 17:39:20, Hanjun Guo wrote:
> diff --git a/arch/arm64/kernel/acpi_numa.c b/arch/arm64/kernel/acpi_numa.c
> new file mode 100644
> index 0000000..f7f7533
> --- /dev/null
> +++ b/arch/arm64/kernel/acpi_numa.c

> +/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
> +int __init acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
> +{
> + u64 start, end;
> + int node, pxm;
> +
> + if (srat_disabled())
> + return -EINVAL;
> +
> + if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) {

Must be:

ma->header.length < sizeof(struct acpi_srat_mem_affinity)) {

Allow extensions to struct acpi_srat_mem_affinity in newer versions.

> + bad_srat();
> + return -EINVAL;

We need a pr_err() here to avoid that numa setup fails silently due to
bad fw. This applies to all error paths.

See my delta patch below. You can merge it with your patch.

-Robert

> + }