[RFC PATCH 05/36] ACPI / PPTT: Add a helper to fill a cpumask from a processor container
Jonathan Cameron
Jonathan.Cameron at huawei.com
Tue Jul 22 07:28:07 PDT 2025
On Fri, 11 Jul 2025 18:36:17 +0000
James Morse <james.morse at arm.com> wrote:
> The PPTT describes CPUs and caches, as well as processor containers.
> The ACPI table for MPAM describes the set of CPUs that can access an MSC
> with the UID of a processor container.
>
> Add a helper to find the processor container by its id, then walk
> the possible CPUs to fill a cpumask with the CPUs that have this
> processor container as a parent.
>
> CC: Dave Martin <dave.martin at arm.com>
> Reviewed-by: Sudeep Holla <sudeep.holla at arm.com>
> Signed-off-by: James Morse <james.morse at arm.com>
> +/**
> + * acpi_pptt_get_cpus_from_container() - Populate a cpumask with all CPUs in a
> + * processor containers
> + * @acpi_cpu_id: The UID of the processor container.
> + * @cpus The resulting CPU mask.
Missing colon.
From a W=1 build (and hence kernel-doc warning).
> + *
> + * Find the specified Processor Container, and fill @cpus with all the cpus
> + * below it.
> + *
> + * Not all 'Processor' entries in the PPTT are either a CPU or a Processor
> + * Container, they may exist purely to describe a Private resource. CPUs
> + * have to be leaves, so a Processor Container is a non-leaf that has the
> + * 'ACPI Processor ID valid' flag set.
> + *
> + * Return: 0 for a complete walk, or an error if the mask is incomplete.
> + */
> +int acpi_pptt_get_cpus_from_container(u32 acpi_cpu_id, cpumask_t *cpus)
More information about the linux-arm-kernel
mailing list